According to L. E. Dickson's History of the theory of numbers, vol. 2, ch. 1, this goes back to Pythagoras (570-501 BC)
Later: Ah... Browsing that book is always fun. «N. Beguelin made a puerile illogical attempt to prove that every number is a sum of three triangular numbers». Poor guy: Dickson does not treat him with any kindness at all...

