Fermat polygonal number theorem is a theorem in additive number theory, it is states that every positive integer is a sum of at most $$n n$$-gonal numbers.

Let $$n\geq 3$$, the polygonal numbers of order $$n$$ are the integers

$$p_n(k)=\frac{n-2}{2}(k^2-k)+k$$

for $$k=0,1,2,\dotsc.$$