16 February 2026
Number theory was the one area of mathematics on which Pierre de Fermat (1607–65) worked throughout his life, and he found it ‘very beautiful and very subtle’.1
Among other results, he said that the Polygonal Number Theorem (which asserts that Every natural number is the sum of at most $n$ $n$-gonal numbers) was ‘a most beautiful and wholly general proposition […] this marvellous proposition’.2
(He offered no proof of this result, but claimed to have one in a marginal note to Diophantus’ Arithmetica; this was the same book in which he noted what became known as Fermat’s Last Theorem.2)
Fermat also seems to have counted magic squares and analogous configurations as part of number theory, and wrote that:
‘I know hardly anything more beautiful in arithmetic than these numbers that some call planetary and others magic’.3
(The term ‘planetary’ is derived from certain treatises linking the magic squares to planets used in talismans.)
He said he had found a rule to find magic cubes (one of his examples is in the attached image) and also determined how many different ways each such cube can be arranged, which he called ‘one of the most beautiful things in arithmetic’.
A. J. Cain. Form & Number: A History of Mathematical Beauty. Lisbon, 2024. pp. 298–300. ↩
Fermat. ‘Observations sur Diophante’. In: Œuvres, vol. I. pp. 305, 334. ↩ ↩2
Fermat, letter to Mersenne, dated 1 Apr. 1640, repr. in Œuvres. Ed. by P. Tannery & C. Henry. Paris: Gauthier-Villars et Fils, 1891/1896. vol. II, p. 194. ↩