Sums of more than one combination of squares.

127 Views Asked by At

I'm interested in examples like these, where the sum of $n$ squares equals the sum of another $n$ squares.

$3^2 + 11^2 \quad = \quad 7^2 + 9^2 \quad = \quad 130$

$5^2 + 6^2 + 10 ^ 2 \quad = \quad 4^2 + 8^2 + 9^2 \quad = \quad161$

$4^2 + 9^2 + 11^2 \quad = \quad 5^2 + 7^2 + 12^2 \quad = \quad 218$

$3^2 + 6^2 + 10^2 + 11^2 \quad = \quad 4^2 + 5^2 + 9^2 + 12^2 \quad = \quad 266$

Is there a way to generate equalities like these?

If not, is there a way to, given $n$ integers, find a combination of another $n$ integers that satisfies this condition? Or maybe there is a way to tell if a solution exists?