Can a sum of $n$ squares be expressed as the sum of $n/2$ squares

elementary-number-theorypythagorean triplessums-of-squares

The answer for the special case when the squares are Pythagorean triple is yes. The Pythagorean triples are the case of the lowest $n$, namely $2$. Two Pythagorean triples can be combined to form a sum of $4$ squares as in $(3^2 + 4^2) + (5^2 + 12^2) = 5^2 + 13^2$. Combining (adding) Pythagorean triples, we can make a sum of squares with arbitrary $n$.

Question: What happens in the general case when the pairs of squares involved are not Pythagorean triples or when not all pairs are Pythagorean?

Best Answer

The answer is yes for (even) $n \geq 8$ and no for (even) $n \leq 7$.

If $n \geq 8$ then the sum of your $n$ squares is the sum of four squares by the Lagrange four square theorem. Now, if $n/2$ is greater than 4, you can complete your sum by adding enough terms equal to $0^2$.

For $4 \leq n \leq 7$ note that $7$ can be written as the sum of $n$ squares but cannot be written as the sum of $n/2$ squares.

For $2 \leq n \leq 3$ note that $5$ is the sum of $n$ squares but not the sum of $n/2$ squares.