==

# Fermat polygonal number theorem

In mathematics, the Fermat polygonal number theorem states: every positive integer is a sum of at most n n-polygonal numbers.

An example of triangular number case would be 17 = 10 + 6 + 1.

A well-known special case of this is Lagrange's four-square theorem, which states that every positive number can be represented as a sum of four squares, for example, 7 = 4 + 1 + 1 + 1.

Joseph Louis Lagrange proved the square case in 1770 and Gauss proved the triangular case in 1796, but the theorem was not resolved until it was finally proven by Cauchy in 1813. Nathanson's proof (see the references) 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.

References

* Eric W. Weisstein. "Fermat's Polygonal Number Theorem." From MathWorld--A Wolfram Web Resource. http://mathworld.wolfram.com/FermatsPolygonalNumberTheorem.html

* Nathanson, M. B. "A Short Proof of Cauchy's Polygonal Number Theorem." Proc. Amer. Math. Soc. Vol. 99, No. 1, 22-24, (Jan. 1987).