MathOverflow will be down for maintenance for approximately 3 hours, starting Monday evening (06/24/2013) at approximately 9:00 PM Eastern time (UTC-4).
4

Is there software that helps list small solutions of the Diophantine equation $$ x_0^2=1+x_1^2+x_2^2+\cdots+ x_n^2 $$ where "small" is negotiable, but e.g. we could fix $x_0$ and and ask for the list of all solutions $x_1, \dots, x_n\in\mathbb Z$?

flag
2 
This is $$(x_0-x_1)(x_0+x_1)=x_0^2-x_1^2=1+x_2^2+\cdots +x_n^2,$$ so sort of reduces to factorization. – Robin Chapman Jun 10 2010 at 20:17
@Will, I wish to distinguish $x_j$ and $-x_j$. Please do not bother to write anything in C++; I just want to know whether there is anything already available as part of Mathematica ot other similar package. @Robin, thanks, reducing factorization is helpful idea. – Igor Belegradek Jun 10 2010 at 21:01
2 
For $n=2$ you can try alpertron.com.ar/QUAD.HTM for various values of $x_0$. – Eric Rowell Jun 10 2010 at 21:12
2 
SquaresR[d, n] gives the number of ways r_d (n) to represent the integer n as a sum of d squares. PowersRepresentations[n, k, p] gives the distinct representations of the integer n as a sum of k non-negative p\^th integer powers. EllipticTheta[a,u,q] gives the theta function Subscript[\[CurlyTheta], a](u,q) (a=1,\[Ellipsis],4). – Will Jagy Jun 10 2010 at 21:19
note the above are Mathematica commands – Will Jagy Jun 10 2010 at 21:52

2 Answers

2

Have you had a look on this tutorial: http://reference.wolfram.com/mathematica/tutorial/DiophantineReduce.html ? To take different values n < n_max into account, a simple loop could work.

link|flag
0

This function in Mathematica find them all:

f[n_] := Reduce[ Total[Table[x[i]^2, {i, 1, n}]] + 1 == x[0]^2 && 
             (Table[x[i], {i, 1, 3}] /. List -> LessEqual), 
              Table[x[i], {i, 0, n}], Integers]   

Invoke with:

f[1], f[3] ... etc
link|flag

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.