A classical result of Fermat asserts that any prime p ≡ 1 (mod 4) can
be written as the sum of two squares of integers. Fermat also conjectured
that each n ∈ N = {0, 1, 2, . . .} is the sum of three triangular numbers.
(Those integers of the form 0 + 1 + · · · + m = m(m + 1)/2 are called
triangular numbers.) An equivalent version of this states that 8n + 3 is
the sum of three squares (of odd integers). This follows from the following
profound theorem