MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

SumOfSquaresRepresentations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg103475] SumOfSquaresRepresentations
  • From: janos <janostothmeister at gmail.com>
  • Date: Wed, 23 Sep 2009 23:51:32 -0400 (EDT)

To be on the safe side:
ClearAll[d, n, x, a, SumOfSquaresRepresentations];

Take this from the help:
SumOfSquaresRepresentations[d_, n_] :=
 Module[{x,
   a}, (a = Array[x, d]) /. {ToRules[Reduce[a.a == n, a, Integers]]}]

Let's apply it:
SumOfSquaresRepresentations[3, 15]
{x$110[1], x$110[2], x$110[3]}

And this is the only case that you get this funny result
writing any integer between 1 and 200 in the place of 15.

Any idea?

Thank you.

J=E1nos


  • Prev by Date: OneIdentity
  • Next by Date: Re: Offline use of Paclets
  • Previous by thread: Re: OneIdentity
  • Next by thread: Re: SumOfSquaresRepresentations