Fermat polygonal number theorem

That is, the n-gonal numbers form an additive basis of order n. Three such representations of the number 17, for example, are shown below: The theorem is named after Pierre de Fermat, who stated it, in 1638, without proof, promising to write it in a separate work that never appeared.

[1] Gauss proved the triangular case in 1796, commemorating the occasion by writing in his diary the line "ΕΥΡΗΚΑ!

For this reason, Gauss's result is sometimes known as the Eureka theorem.

[3] The full polygonal number theorem was not resolved until it was finally proven by Cauchy in 1813.

[1] The proof of Nathanson (1987) is based on the following lemma due to Cauchy: For odd positive integers a and b such that b2 < 4a and 3a < b2 + 2b + 4 we can find nonnegative integers s, t, u, and v such that a = s2 + t2 + u2 + v2 and b = s + t + u + v.

Gauss's diary entry related to sum of triangular numbers (1796)