CHAP, vni] SUM OF FOUR SQUARES. 285 



Cauchy 21 noted that if p is a prime and a, (3 are integers for which 

 a + )8 + 1 = P, and if A ranges over a + 1 distinct values modulo p, 

 and 5 over /3 + 1 values, then A -\- B takes at least + + 1 distinct 

 values modulo p. For A and 5 not divisible by p, Ax 2 and ?/ 2 + C each 

 take (p + l)/2 distinct values modulo p, when p is a prime > 2. Hence 

 .Ax 2 + #i/ 2 + C takes all p distinct values modulo p and therefore the value 

 zero. Cf. Cauchy 95 of Ch. I. 



Cauchy 22 noted [the case d = s = 0of(l)]] 



= (ap + bq + cr) 2 + (aq bp) 2 + (ar cp) 2 + (6r eg) 2 , 



and a like formula with n squares instead of 3 [see Cauchy 61 of Ch. IX]. 



A. M. Legendre 23 gave (8) and concluded that every number of the form 

 Sn + 4 is a sum of four odd squares in a(2n + 1) ways, where v(k] is the 

 sum of the divisors of k. It is said to follow readily that every integer is a SI . 



C. G. J. Jacobi 24 proved Bachet's theorem by comparing the formulas 



1 + 2q + 2<? 4 + 2<? 9 + = 



n= oo 



V 1 + 8 I * 4- V 4- 3<?3 4- 

 IT)* = 1 + 51 - -f- - ; - - -f- - -- - + 



11 q 1 + q 2 1 q z 



including (7), where p ranges over the positive odd numbers, and a(p) 

 denotes the sum of the divisors of p. At the same time we obtain the 

 theorem : The number of representations 76 of 2 a p as a sum of 4 squares is 

 8ff(p) or 24<r(p), according as a = or a > 0. Cf. Jacobi 226 of Ch. III. 

 Jacobi 25 compared the formulas 26 



where p ranges over the odd positive numbers, and concluded that there 

 are <r(p) sets of four positive odd numbers the sum of whose squares is 

 4p [see papers 23, 30, 42, 52, 69, 72, 82, 91]. 



V. Bouniakowsky 27 proved that, if A, B, C are integers not divisible by 

 the prime p, we can give to x, y such integral values that Ax 2 + By 2 C 

 is divisible by p. He first found the conditions that x or y can be a multiple 

 of p; then noted that, if neither can be a multiple of p, the congruence can 

 be written p M + p^ 1 = (mod p), where p is a primitive root of p, 



21 Jour, de 1'ecole polyt., vol. 9 (cah. 16), 1813, 104-116; Oeuvres, (2), I, 39-63. 



22 Cours d'analyse de 1'ecole polyt., 1, 1821, 457. 



23 TraitS des fonctions elliptiques, 3, 1828, 133. Stated in Legendre'e Theorie des nombres, 



ed. 3, I, 1830, 216, No. 154 (Maser, I, 217); not in eds. 1, 2. Cf. Bouniakowsky, Vol. 

 I, p. 283. Cf. Jacobi. 25 



24 Werke, I, 423-4; Jour, fur Math., 80, 1875, 241-2; Bull, des sc. math, astr., 9, 1875, 67-9; 



letter, Sept. 9, 1828, Jacobi to Legendre. Jacobi, Fundamenta Nova Funct. Ellipt., 

 Konigsberg, 1829, p. 188, p. 106 (34), p. 184 (6); Werke, I, 239. Cf. J. Tannery and 

 J. Molk, Elem. theorie fonct. ell., 4, 1902, 260-3; J. W. L. Glaisher, Quar. Jour. Math., 

 38, 1907, 8; papers 51-2, 81, 88, 110-1. 



25 Jour, fur Math., 3, 1828, 191; Werke, I, 247. Cf. LiouviUe 1 and Deltour 29 of Ch. XI. 



26 Fundamenta Nova Funct. Ellipt., 1829, 106 (35), 184 (7); Werke, I, 162, 235. 



27 M<m. Acad. Sc. St. Petersbourg (Math.), (6), 1, 1831, 565-581. 



