CHAP, viii] SUM OF FOUR SQUARES 301 



Now the third form represents N only if N is a quadratic residue 0, 1, 4, 7 

 of 9. But in these cases, the first form represents N only when x or y is 

 divisible by 3. Thus \{/'(N) is zero except in the following cases: 



f(N) = MAO if N = 1, 4, 7 (mod 9); f(N) = x (tf/9) if N = 0. 



Thus $' and hence also ^ is fully determined. 



R. D. von Sterneck 97 gave an elementary proof that every prune p 

 divides the sum of two or three squares, no one divisible by p. Let R } 

 denote a quadratic residue and Nj a non-residue of p. If 1 is a residue 

 of p, a sum 1 + s 2 is divisible by p. If 1 is a non-residue of p, there 

 exist two residues whose sum is a non-residue. For, if not, the sum of j 

 residues is a residue; in particular, jR = Rj (mod p), which is false when j 

 is a non-residue. From 



R + R l = N, - N = R z (mod p) 



follows R + Ri + Rz = (mod p}. 



B. Bolzano 98 proved the existence of integers t, u such that 



t 2 - Bu 2 - C = (mod p), 



B and C not being divisible by the prune p [Lagrange 9 ]. For t = 0, 1, , 

 \ (p 1), its square t 2 takes %(p + 1) incongruent values modulo p. For 

 u = 0, 1, , %(p 1), the sum Bu 2 + C takes %(p + 1) incongruent 

 values. Hence at least one of the first values is congruent to one of the 

 latter, since otherwise there would be p + 1 incongruent numbers modulo p. 

 J. W. L. Glaisher" noted that all the partitions a 2 + /5 2 + y 2 -f 8 2 of 

 4m into 4 odd squares can be derived from the partitions a 2 + 6 2 + c 2 + d 2 

 of the odd number m by the transformations [cf. Stern 81 ]: 



a = a6 + c + d, /? = a =F 6 c + d, 

 7 = aT& + c d, 5 = a6 c rf. 



A partition of m produces twice as many representations of 4m as of m, 

 and every partition of 4m can be derived from one of m by such a transforma- 

 tion. Hence the number of representations of m as a 30 is 8 times the 

 number of compositions of 4m as a sum of 4 odd squares. Here and later, 

 he 100 made a further study of the function X(m) [Glaisher 76 ] and the related 

 functions P(m), Q(m), 12 (m), defined as the sums of the products of the 

 roots (taken hi the form 4n + 1) of the first 2, 3, 4 squares in each composi- 

 tion of 4m as a sum of 4 odd squares, X(m) itself being the sum of the roots 

 of the first square in the various compositions. 



Glaisher 101 applied elliptic function formulas to find the number of 

 representations of a number as a sum of four squares of which r are even, 

 for r = 0, 1, 2, 3, 4. 



97 Monatshefte Math. Phys., 15, 1904, 235-8. 



98 Ibid., 237-8 (posthumous paper). 



99 Quar. Jour. Math., 36, 1905, 305-358. Extracts by P. Bachmann, Niedere Zahlentheorie, 



II, 287-292, 319. 



100 Ibid., 37, 1906, 36-48. 



101 Ibid., 38, 1907, 8-9. 



