ABSTRACT

Which integers can be written as the sum of two squares? As we’ll see, the case of prime numbers is the key. The French mathematician Albert Girard observed that every prime congruent to 1 mod 4 is a sum of two squares. Fermat, in a letter to Mersenne in 1640, said that he had a proof, and it is generally believed that this is the case. The first published proof is due to Euler in 1747. The proof we give is based on a lemma of Axel Thue (1863-1922), a Norwegian mathematician who did fundamental work in combinatorics and also on the approximation of irrational numbers by rational numbers.