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

307 Views Asked by At

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?

4

There are 4 best solutions below

1
On 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.

13
On

Any two Pythagorean triples may be represented as the sum of four squares or the sum of two squares.

Examples: $\qquad(15^2+8^2)+(21^2+20^2)=17^2+29^2$

or, from the example I showed in my first version of this answer: $$157^2+12324^2=6493^2+10476^4=10147^2+6996^2=12317^2+444^2=12325^2$$ $\implies(157^2+12324^2)+(6493^2+10476^4)+(10147^2+6996^2)+(12317^2+444^2)\\\qquad\qquad\qquad=(12325^2)+(12325^2)+(12325^2)+(12325^2)$

where $8$ sums of squares are expressed as $4$. I gave the example of $4$ equal values but any even number of any combinations of $C$-values can be reduced to half that number.

Another example is here where $10$ square sums are equal to $5$ sums $\qquad\qquad (3^2+4^2)+(5^2+12^2)+(13^2+84^2)+(85^2+132^2)+(157^2+12324^2)\\ \qquad\qquad=5^2+13^2+85^2+157^2+12325^2$

For your last question, if squares are not required, there are also infinite solutions: $$(12+13)+(168+1)=5^2+13^2$$ or $$(1^2+2^2)+(4^2+5^2)=(5+41)$$

2
On

From Lagrange's four square theorem, we have that every natural number can be expressed as the sum of four perfect squares. Because we can always add $0^2$ without changing the sum, this means that every natural number can be written as the sum of $n$ squares for any $n\geq4$.

Your problem asks if given that $M$ is the sum of $n$ squares, can it be written as the sum of $\frac{n}{2}$ squares. As this requires that $n$ be even, we have four cases:

Case 1: $n=2$

In this case, given that $M$ is the sum of two squares, it is only the sum of one square if we have a Pythagorean triple.

Case 2: $n=4$

In this case, $M$ can be any natural number. The question asks if a generic natural number can be written as the sum of 2 squares. The answer to this question comes from the Sum of Two Squares Theorem, credited to Euler, and says that a number can be written as the sum of two squares if and only if its prime factorization doesn't contain a prime that is congruent $-1\mod4$ raised to an odd power.

Case 3: $n=6$

In this case, M can be any natural number. The question asks if a generic natural number can be written as the sum of 3 squares. From Legendre's Three-Square Theorem, the answer is that most, but not all natural numbers can be written as the sum of three squares. Specifically, all natural numbers but those appearing in this OEIS sequence can be written as the sum of three squares

Case 4: $n\geq8$

In this case, every natural number can be written as the sum of $\frac{n}{2}$ squares, and therefore the answer is trivially yes.

For the Cases 3 and 4, we have enough leeway in choosing $n$ squares that we can choose a breakup that does not include any Pythagorean Triples

5
On

I am not sure whether I understand the question correctly, because if this is what you actually mean, then it is not too difficult to come up with counter examples.

My interpretation : Given a collection of $n$ positive integers, $\{ a_1, ..., a_n \}$, it is possible to find a collection of $n/2$ positive integers, say, $\{ b_1, ... , b_{n/2} \}$ such that $$ \sum_{i=1}^{n} {a_i}^2 = \sum_{i=1}^{n/2} {b_i}^2 $$.

If this is what you actually mean, first consider $n$ to be an odd integer and we are done. Because $n/2$ is not an integer the statement is obviously false.

Now suppose $n$ is only allowed to be even. Consider, say $n = 2$ and $a_i = 1$ for both $i=1,2$. $\sum {a_i}^2 = 1^2 +1^2 = 2$, not a perfect square, and is thus a counterexample to the statement.