CHAP. VI] SUM OP TWO SQUARES. 227 



He treated the generalization to divide any number (as 2) into two parts 

 such that, if a given number (as 4) is added to each part, the sums are 

 squares, whence 10 is to be expressed as a sum of two squares each > 4. 



Fermat's 8 comment was: "The true condition (namely, that which is 

 general and which excludes all the numbers which are inadmissible) is that 

 the given number a must not be odd and that 2a + 1, when divided by the 

 largest square entering it as a factor, must not be divisible by a prime 

 4n - 1." 



A. Girard 9 (f Dec. 9, 1632) had already made a determination of the 

 numbers expressible as a sum of two integral squares : every square, every 

 prime 4n + 1, a product formed of such numbers, and the double of one 

 of the foregoing. 



Bachet 7 (p. 173) in his comment on Diophantus III, 22 found that 5525 

 is the sum of the squares of 55 and 50, 62 and 41, 70 and 25, 71 and 22, 

 73 and 14, 74 and 7. Also 1073 = 32 2 + 7 2 = 28 2 + 17 2 is a sum of two 

 squares in four ways. Thus 5525 1073 is a sum of two squares in 24 ways, 

 all being given. He stated and proved (1) in his Porisms, III, 7. 



Fermat 10 made, apropos of Bachet's preceding comments, the remarks: 



(A) Every prime of the form 4n + 1 is the hypotenuse of a right 

 triangle in a single way, its square in two ways, its cube in three, its bi- 

 quadrate in four, and so on indefinitely. 



(B) The same prime [4n + 1] and its square are the sums of two 

 squares in a single way, its cube and biquadrate in two ways, its fifth and 

 sixth powers in three ways, and so on indefinitely. 



(C) If a prime which is the sum of two squares be multiplied by an- 

 other prune also the sum of two squares, the product will be the sum of two 

 squares in two distinct ways; if the first prime be multiplied by the square 

 of the second prime, the product will be the sum of two squares in three 

 distinct ways; if the first prime be multiplied by the cube of the second, 

 the product will be the sum of two squares in four distinct ways, and so on 

 indefinitely. 



(D) It is now easy to determine in how many ways w a given number 

 can be the hypotenuse of a right triangle. For the number p a q b r c s, where 

 p, q, r are primes of the form 4n + 1, while s is a square having no such 

 prime factor, 



w = 2c(2ab + a + 6) + 2ab + a -f & + c. 



Here, and in (E), Fermat used numerical values. 



(E) To find a number which is an hypotenuse in an assigned number 

 w of ways, take the prime factors of 2w + 1, subtract 1 from each and 



8 Oeuvres, III, 256. 



9 L'arith. de Simon Stevin annotations par A. Girard, Leide, 1625, 622; Oeuvres Math. 



de Simon Stevin par Albert Girard, 1634, p. 156, col. 1, note on Diophantus V, 12. Cf. 

 G. Vacca, Bibliotheca Math., (3), 2, 1901, 358-9. Cf . G. Maupin, Opinions et Curiosites 

 touchant la Mathe'matique, Paris, 2, 1902, 158-325. 



10 Oeuvres, I, 293; III, 243-6. Diophanti Alex. Arith., ed., S. Fermat, 1670, 127. 



