CHAP. VII] SUM OF THREE SQUARES. 261 



June 9, 1750 (p. 515), Euler expressed this as the first of the following: 



a 2 + 6 2 + c 2 = (2m - a) 2 + (2m - 6) 2 + (2m -- c) 2 , if a + b + c = 3m; 

 a 2 + 6 2 + c 2 = (m - a) 2 + (m - b) 2 + (2m - c) 2 , if a + b + 2c = 3m; 

 a 2 + 6 2 + c 2 = (2m - a) 2 -f (4m - 6) 2 + (4m - c) 2 , if a + 26 + 2c = 9m; 



and gave five more such formulae and similar ones for ID. 



Euler 13 verified that if m ^ 187 and m is of the form SN + 3, then m 

 is the sum of an odd square and the double of a prune 4?i + 1. Since 

 4n + 1 = a 2 + b 2 , 2(4n + 1) = (a + b) 2 + (a - b) 2 , and the m's in ques- 

 tion are G3 . 



J. L. Lagrange 14 remarked that a prune 8w 1 is of the form 24n 1 

 or 24n + 7. Since he had proved that any prune 24n + 7 is of the form 

 y 2 + 6z 2 , its double equals (y + 2z) 2 + (y - 2z) 2 + (2z) 2 . He added that 

 he did not see a proof of Fermat's 9 assertion for the remaining case of 

 primes 24n 1. 



J. A. Euler 15 used (a 2 I) 2 + 4a 2 = (a 2 + I) 2 for a = p, q, to prove the 

 identity 



(p 2 + 1) 2 ( 9 2 + I) 2 = (q 2 - l) 2 (p 2 + I) 2 + 4g 2 (p 2 - I) 2 + (4pg) 2 . 



A. M. Legendre 16 remarked that Fermat's 9 assertion is true not only of 

 primes but of all odd numbers, and stated that either every number or its 

 double is a 02. His proof 17 (pp. 545-8) was based on empirical theorems on 

 the quadratic divisors of t 2 + cu 2 . He was led (pp. 530-542) to the empirical 

 theorem that, if c is a prime 8m 3 or 8m + 1, the number of decomposi- 

 tions of c into a sum of three squares (ignoring the order and signs of the 

 roots) is the number of reduced quadratic divisors of the form 4n + 1 

 (or of the form 4n 1) ; while for a prime c = 8m + 3, it is the number of 

 reduced quadratic divisors. 



P. Cossali 18 noted that the sum of the squares of n, n + 1, n(n -f- 1) 

 equals the square of n 2 -f n + 1. This result has been attributed 100 to 

 Diophantus, who in III, 5 noted that 2 2 + 3 2 + 6 2 = D. 



Legendre 19 proved [the statement of Beguelin 75 of Ch. I] that every 

 positive integer, not of the form Sn + 7 or 4ra, is a sum of three squares 

 having no common factor; the proof is by means of theorems on reciprocal 

 (p. 367) quadratic divisors of t 2 + cu 2 . In 2(2a + 1) = x 2 + y 2 + z 2 , two 

 of the squares must be odd and the third even. Hence we may set 

 x = p + q, y = p q, z = 2r and get 2a + I = p 2 + q 2 -f 2r 2 . Again, 

 any integer is of the form 2 2n (2a + 1) or 2 2n -2(2o + 1), and the latter is a 

 SI; hence either any integer or its double is a G3. The product (p. 198) 

 of two G2 is not in general a G2, since (1 + 1 + 1)(16 + 4 + 1) is not a O. 



13 Acta Acad. Petrop., 4, II, 1780 (1775), 38; Comm. Arith., II, 138. 



14 Nouv. M6m. Acad. Roy. Berlin, annee 1775, 356-7; Oeuvres, III, 795. In the quotation 

 from Fermat, sum of a square and a double square should read sum of three squares. 



15 Acta Acad. Petrop., 3, 1779, 40-8. L. Euler's Comm. Arith., II, 463. 



16 Hist, et Mem. Acad. Roy. Sc. Paris, 1785, 514-5. 



17 Incomplete. Cf. A. Genocchi, Atti Accad. Sc. Torino, 15, 1879-80, 803; Gauss. 20 



18 Origine, Trasporto in Italia. . . Algebra, 1, 1797, 97. 



"ThiSorie des nombres, 1798, 398-9 (stated p. 202); ed. 2, 1808, 336-9 (p. 186); ed. 3, I, 

 1830, 393-5 (German transl. by Maser, I, 1893, 386-8). 



