The square 169 can be written as a sum of two squares 52 + 122, as a sum of three
squares 32 + 42 + 122, as a sum of four squares 12 + 22 + 82 + 102, as a sum of five
squares 12 + 22 + 22 + 42 + 122, and so on for quite a long while. In fact, Jackson,
et al. [5] note that 169 can be written as a sum of k positive squares for all k from 1
to 155 and first fails as a sum of length 156. The authors go on to ask whether there is
any limit to such a string of sums. Specifically, for every positive integer b is there an
integer n which can be written as a sum of k positive squares for all k from 1 to b? We
assemble a collection of results, most of which have been known for quite some time,
to answer this question and, in fact, to specify all possible lengths for sums of squares
equal to a given square.
This investigation began when I read a manuscript in which the author proved that a
certain combinatorially defined integer c(k) could be written as a sum of k positive integer
squares. Although the proof technique was interesting, I wondered if it wouldn’t
be more surprising to find that a sufficiently large integer couldn’t be written as a sum
of k squares. For that reason, in what follows we address the possible lengths for sums
of squares equal to a given integer which may or may not be a square.
resembled the following.