<s>[INST] Is every positive integer a sum of at most 4 distinct quarter-squares? There appears to be no mention in OEIS:  Quarter-squares, A002620.  Can someone give a proof or reference?
Examples:
quarter-squares: ${0,1,2,4,6,9,12,16,20,25,30,36,...}$
2-term sums: ${2+1, 4+1, 6+2, 6+2,...,90+9,...}$
3-term sums: ${12+2+1, 16+2+1,...,72+6+2,...}$
4-term sums: ${240+12+2+1,...,6480+72+6+2,...}$
 [/INST] The quarter-squares are the numbers of form $k^2$ and $k(k+1)$.
Start by expressing $N$ as the sum of four squares.
If you used some square four times, i.e. $N=x^2 + x^2 + x^2 + x^2$, then $N=(2x)^2$ is a quarter-square.
If you used some square three times but not four times, i.e. $N=x^2 + x^2 + x^2 + y^2$, then $N=(x-1)x + x^2 + x(x+1) + y^2$ is a sum of four distinct quarter-squares.
If you used some square twice combined with two other distinct squares, i.e. $N=x^2 + x^2 + y^2 + z^2$, then $N=(x-1)x + x(x+1) + y^2 + z^2$ is a sum of four distinct quarter-squares.
If you used two distinct squares twice each, i.e. $N=x^2 + x^2 + y^2 + y^2$, then $N=(x+y)^2 + (x-y)^2$ is a sum of two distinct quarter-squares.
Finally, if you used four distinct squares, then $N$ is clearly the sum of four distinct quarter-squares.
</s>