Imo propositionem pulcherrimam et maxime generalem nos primi deteximus:nempe omnem numerum vel esse triangulum vex ex duobus aut tribus triangulis compositum: esse quadratum vel ex duobus auttribus aut quatuorquadratis compositum: esse pentagonum vel ex duobus,tribus, quatuor aut quinque pentagonis compositum; et sic deinceps in infinitum, in hexagonis, heptagonis polygonis quibuslibet, enuntianda videlicet pro numero angulorum generali et mirabili propostione. Ejus autem demonstrationem, quae ex multis variis et abstrusissimis numerorum mysteriis derivatur, hic apponere non licet....
I have discovered a most beautiful theorem of the greatest generality: Every number is a triangular number or the sum of two or three triangular numbers; every number is a square or the sum of two, three, or four squares; every number is a pentagonal number or the sum of two, three, four, or five pentagonal numbers; and so on for hexagonal numbers, heptagonal numbers, and all other polygonal numbers. The precise statement of this very beautiful and general theorem depends on the number of the angles. The theorem is based on the most diverse and abstruse mysteries of numbers, but I am not able to include the proof here....
Pierre de Fermat, +/-1650
As with his famous Last Theorem, Fermat had no proof. Gauss proved the case for triangles, Lagrange for squares and Cauchy finally proved the general case. Apostol wrote in his book Analytical Number Theory:
For example, Fermat proved the following surprising theorems: Every integer is either a triangular number or a sum of 2 or 3 triangular numbers; every integer is either a square or a sum of 2, 3, or 4 squares; every integer is either a pentagonal number or the sum of 2, 3, 4, or 5 pentagonal numbers, and so on.
Tom Apostol, 1976
Perhaps Apostol did not know the correct history of the polygonol number theorem. Remember that there was no internet in 1976.
I wanted to see that proof but Apostol had not provided one for obvious reasons. The M381 book did not gave a proof either, so that didn't help much. I checked W'pedia: no proof. Mathworld: no proof. In cases like that there is always Planet Math to the rescue. Not this time anyway. I tried entering a few queries through the OU Library Service, but they returned too many hits. So that did not work either. Anyway, I finally found a hint at the site called 'Fermat polygonal number theorem'. The book Additive Number Theory - The Classical Bases by M. Nathanson has a chapter devoted to it.
I practically beamed myself to the library and picked up a copy. So, I am about to study this enigmatic theorem. Even if I am not ready for this proof yet, I can pinpoint topics for further study. - Chapter 13 'Representation of Integers as Sums of Squares' in Elementary Number Theory by David Burton has Lagrange's proof as well.