Characterizing the set of integers $n$ such that $n^2$ is the sum of $k$ positive squares for all $1\leq k\leq n^2-14$

133 Views Asked by At

My question is inspired from the beautiful last question of the 1992 IMO, given below.

For each positive integer $n$, $S(n)$ is defined to be the greatest integer such that, for every positive integer $k\leq S(n)$, $n^2$ can be written as the sum of $k$ positive squares.

  1. Prove that $S(n)\leq n^2-14$ for each $n\geq 4$.
  2. Find an integer $n$ such that $S(n)=n^2-14$.
  3. Prove that there are infinitely many integers n such that $S(n)=n^2-14$.

Now, let $A$ be the set of integers $n\geq 4$ with the property that $S(n)=n^2-14$. I thought this property was quite striking as each $n\in A$ corresponds to a "hypotenuse" of a Pythagorean m-tuple for all $2\leq m \leq n^2-13$. To solve the problem, one would probably show that $13\in A$. Then, in the spirit of generating new Pythagorean triples from a primitive Pythagorean triple, one can prove a limited closure property for $A$ over some multiplication to show that $A$ is infinite (at least that was my approach). My question is, are there any better closure properties or nicer characterizations of $A$ (that possibly correspond to the Pythagorean triples)? Also, are there any other "primitive" $n$ in $A$ besides $13$?

The closure property I used: if $n\in A$ and $a\in\mathbb{N}$, each representation of $n^2$ as a sum of $k$ and $n^2-k$ positive squares yields a representation of $(an)^2$ as a sum of $k$ and $(an)^2-k$ squares respectively, as if $$n^2=x_1^2+\ldots+x_k^2=y_1^2+\ldots+y_{n^2-k}^2,$$then $$(an)^2=(ax_1)^2+\ldots+(ax_k)^2=y_1^2+\ldots+y_{n^2-k}^2+[(an)^2-n^2]*1^2.$$ Furthermore, for $a^2\leq k\leq a^2(n^2-14)$, we may choose $a^2$ not necessarily distinct representations of $n^2$ as a sum of say $b_1, \ldots, b_{a^2}$ positive squares (for each $1\leq b_i\leq n^2-14$) such that $k=b_1+\ldots +b_{a^2}$, thus the collective sums of squares generates a representation of $(an)^2$ as a sum of $k$ positive squares. Thus, if $a^2\leq n^2-13$ and $a^2(n^2-14)\geq (an)^2-n^2$, then $an\in A$.