Fermat polygonal number theorem

Three such representations of the number 17, for example, are shown below: