2

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?

  • See https://math.stackexchange.com/questions/2069687/representation-of-a-number-as-a-sum-of-squares – Robert Z Jun 07 '17 at 07:35
  • There are certainly algorithmic ways to find, given the factorization of $n$, all of the sums of two squares that add to $n$ and all of the sums of four squares that add to $n$. Most $n$ that can be written at all as the sum of two squares can be so written in more than one way (the primes can't, and that's about it). All $n$ can be written as the sum of four squares, and the number of ways grows roughly linearly with $n$! – Greg Martin Jun 07 '17 at 08:10
  • Well, not for n squares but there is a way you can do that for random numbers on different sides. Just pick a perfect square which is again sum of two squares (greatest in its pythagorean triplet). For example: $25^2+5^2=3^2+4^2+15^2+20^2$ another one is $10^2+25^2=24^2+7^2+6^2+8^2$ – Vidyanshu Mishra Jun 07 '17 at 08:12
  • I posted algorithms that allow one to find all 2-square representations (when possible) and all 3-square representations of an integer on this site. Both methods use quadratic equations and triangular numbers to find the representations. – user25406 Jun 08 '17 at 15:12
  • here are the links for two algorithms mentioned in my previous comment. https://math.stackexchange.com/questions/1972771/is-this-the-general-solution-of-finding-the-two-original-squares-that-add-up-to and https://math.stackexchange.com/questions/2070691/on-the-number-of-ways-of-writing-an-integer-as-a-sum-of-3-squares-using-triangul – user25406 Jun 13 '17 at 19:06

0 Answers0