286 HISTORY OF THE THEORY OF NUMBERS. [CHAP, vm 



and M and N are odd. The latter congruence can be solved. Or the 

 theorem can be derived by multiplication from Lagrange's case A = 1. 



If N is any odd integer or the double of an odd integer, while A, B, C 

 are integers prime to N, Ax 2 + By* C = (mod N) is solvable. 



Given two arithmetical progressions whose first terms a, J3 are arbitrary 

 and whose common differences A, B are not divisible by the prime p, 

 we can choose n and n r so that the total sum of n terms of the first, n' 

 terms of the second, and any given integer E, is divisible by p : 



{2a + (n - l)A}n + {2/3 + (n f - l)B\n f + E = (mod p). 



For, this can be reduced to the above congruence. 



F. Minding 28 noted that integers u and v can be chosen so that 

 v? Bv 2 C is divisible by the prime p, if neither B nor C is divisible by p. 

 In fact, for v = 0, 1, ,(?- l)/2, the function Bv 2 + C takes (p + l)/2 

 distinct values modulo p, and at least one must be congruent to one of the 

 (p + l)/2 values of u 2 , since otherwise there would be p + 1 residues 

 modulo p. Hence we can choose u and v less than p/2 so that u 2 + v 2 + 1 

 is divisible by p. The proof that p is a 31 is that by Euler. 10 



G. Libri 29 proved that there are n 1 sets of solutions < n of 



x 2 + ay 2 + b = (mod ri), 



if a, b are not divisible by the prime n. He first expressed the number 

 of sets of solutions as a double sum involving roots of unity. 



C. G. J. Jacobi 30 gave an arithmetical proof of his 25 theorem on the 

 number /z of sets of positive odd solutions w, - - - , z of 



(11) w 2 + x 2 + y 2 + z 2 = 4p, 



where p is a given positive odd number. Two distinct permutations of the 

 same numbers are counted as different solutions. For such a set, 



w 2 + x 2 = 2p', y 2 + z 2 = 2p", p' + p" = 2p, 

 where p' and p" are odd. Conversely, these equations imply (11). Hence 



M == N[2p' = w 2 + x^-N[2p" = y 2 + z 2 ], p' + p" = 2p; p', p" odd, 



P'.JP" 



where N[2p' = w 2 + z 2 ] denotes the number of positive solutions w, x of 

 2p f = w 2 + x 2 . The latter number is N[p' = aa] N[p' = oa'], where 

 a ranges over the factors of the form 4m + 1 of p' and a' over the factors 

 4m + 3. Let /? and /3' range over the factors 4m + 1 and 4m + 3, respec- 

 tively, of p". Then 



N[2p" = y 2 + z 2 ] = Nip" = 6/5] - N[_p" = 60']. 

 Set #[>] = N[2p = u}. Then 



" = 6/3] = #[> + W etc., 

 + 60'] - - 2N[aa + 60']. 



28 Anfangsgriinde dcr hoheren Arith., Berlin, 1832, 191-3. 



29 Jour, fur Math., 9, 1832, 182. See Libri 147 - 8 of Ch. XXIII. 



30 Jour, fur Math., 12, 1834, 167-172; Werke, 6, 1891, 245-251. 



