From: Kurt Foster Subject: Re: a^2+b^2+c^2+d^2=e^2+f^2+g^2+h^2 Date: Mon, 18 Oct 1999 16:21:06 GMT Newsgroups: sci.math Keywords: representations of integers by four squares In <3809eae3.2675242@news.hex.fi>, Nuutti Kuosa said: . If a,b,...,h are positive integers. Is there any parametric solution . that gives all solutions to a^2+b^2+c^2+d^2=e^2+f^2+g^2+h^2 . or is there any rules that tells when solution impossible. Or does . anyone know any reference or artice to additional information. You might consult Hardy and Wright's "An Introduction to the Theory of Numbers". They prove the representability by four squares by several methods, from the elementary to "integral quaternions" (the maximal Z-order in the rational quaternions), and via infinite series. Theorem 386 gives the number of representations by four squares. The formula, however, counts changes in sign and changes in order as giving "different" representations. The number of representations of the positive integer n as a sum of four squares in this sense, is r_4(n) = 8 * [SUM, d, d|n, NOT(4|d)]. I'm too lazy to work out the various cases [zero summands, equal square summands etc] but the greatest possible number of "different" representations by the same four squares is 2^4 * 4! = 384. If r_4(n) is greater than 384, n will certainly be expressible as the sums of two different sets of four squares.