Integer as Sum of Polygonal Numbers/Historical Note

Fermat's Note
As himself put it:

struggled on and off with the proof for squares without success for nearly $40$ years. finally managed this in $1772$.

proved the theorem for triangular numbers in $1796$.

Finally, proved the theorem in its completeness in $1815$.