NUMBERS AS THE SUMS OF SQUARES 483
a given number is added to either part, the result will be a
square.’ The condition is in two parts. There is no doubt as
to the first, ‘ The given number must not be odd ’ [i. e. no
number of the form 4n + 3 or 4n—l can be the sum of two
squares] ; the text of the second part is corrupt, but the words
actually found in the text make it quite likely that corrections
made by Hankel and Tannery give the real meaning of the
original, ‘ nor must the double of the given number plus 1 be
measured by any prime number which is less by 1 than a
multiple of 4 This is tolerably near the true condition
stated by Fermat, ‘The given number must not be odd, and
the double of it increased by 1, when divided by the greatest
square which measures it, must not be divisible by a prime
number of the form in— 1.’
(/3) On numbers which are the sum of three squares.
In V. 11 the number 3 a 4- 1 has to be divisible into three
squares. Diophantus says that a ‘must not be 2 or any
multiple of 8 increased by 2 That is, ‘ a number of the
form 24 n + 7 cannot be the sum of three squares ’. As a matter
of fact, the factor 3 in the 24 is irrelevant here, and Diophantus
might have said that a number of the form 8 n + 7 cannot be
the sum of three squares. The latter condition is true, but
does not include all the numbers which cannot be the sum of
three squares. Fermat gives the conditions to which a must be
subject, proving that 3a +1 cannot be of the form 4 n (24k + 7)
or 4 n (8k+ 7), where h — 0 or any integer.
(y) Composition of numbers as the sum of four squares.
There are three problems, IV. 29, 30 and V. 14, in which it
is required to divide a number into four squares. Diophantus
states no necessary condition in this case, as he does when
it is a question of dividing a number into three or two squares.
Now every number is either a square or the sum of two, three
or four squares (a theorem enunciated by Fermat and proved
by Lagrange who followed up results obtained by Euler), and
this shows that any number can be divided into four squares
(admitting fractional as ^ell as integral squares), since any
square number can be divided into two other squares, integral
i i 3