0
$\begingroup$

Any number of appropriately chosen squares can sum to a square. However, this is not the case when the square addends and the square sum are all required to be odd. Since all odd squares are $\equiv 1 \bmod 8$, only sums of $8k+1$ odd squares can equal an odd square. To be clear, it should be possible to find collections of $9,17,\text{ or }25$ (etc.) squares that sum to an odd square, but not collections of (for example) $4$ or $15$ squares that do so. For $a_i,b$ odd $$\sum_{i=1}^m a_i^2=b^2$$ can have solutions only if $m=8k+1$

If $k$ is chosen to be a triangular number $k=\frac{n(n+1)}{2}$ then $8k+1=(2n+1)^2$ and trivial solutions of the form $a_i=c$ arise where the sum is $b^2=((2n+1)c)^2$

In the case of $k=9$ it is not hard to identify collections of squares that satisfy the conditions if the same square summand can be used more than once. For example, $1+1+9+9+9+9+9+25+49=121$ and $1+1+1+1+9+9+25+25+49=121$. More interesting would be cases in which the nine square summands were different. The closest such instances I have found by hand computation are $9+25+49+81+121+121+169+225+289=1089=33^2$ and $9+25+49+81+121+121+169+289+361=1225=35^2$. Each of these has only one duplicated square, $121$. Since the first nine odd squares sum to $969$, it will be the case that any collections featuring nine distinct squares will require $b>33$

Although I have no reason to doubt that examples with no duplications can be found (and I would deem it of interest to see some), such as by computer searches, my real question is: Are there algorithmic methods by which such collections of odd squares can be generated or identified?

$\endgroup$
2
  • 1
    $\begingroup$ So , you are looking for distinct odd squares summing up to another odd square ? $\endgroup$
    – Peter
    Aug 13, 2023 at 17:36
  • $\begingroup$ $$1^2+3^2+5^2+7^2+9^2+11^2+13^2+15^2+29^2=39^2$$ $\endgroup$
    – Peter
    Aug 13, 2023 at 17:45

1 Answer 1

3
$\begingroup$

Let $x_1, x_2, \ldots x_{8k}$ be an odd numbers, $N = \sum_{i = 1}^{8k}x_i^2$. $\frac{N + 4}{4}$ and $\frac{N - 4}{4}$ is an odd numbers since $N$ is divisible by 8. $$N = \left(\frac{N + 4}{4}\right) ^2 - \left(\frac{N - 4}{4}\right)^2$$ $$\left(\frac{N + 4}{4}\right) ^2 = \sum_{i = 1}^{8k}x_i^2 + \left(\frac{N - 4}{4}\right)^2$$ If $x_i$ are pairwise distinct, then we only need to check that $x_i \ne \frac{N - 4}{4}$. This is true because $\left(\frac{N + 4}{4}\right) ^2 < 2\left(\frac{N - 4}{4}\right)^2$ for $N > 25$.

$\endgroup$
3
  • 1
    $\begingroup$ Very nice solution! $\endgroup$ Aug 14, 2023 at 0:33
  • 1
    $\begingroup$ I think this approach can be used for any $8k+1$ collection of squares, viz: $N=\sum_{i=1}^{8k}x_i^2$ and use same logic as presented in the answer. Maybe add that to your answer if you think it is correct. $\endgroup$ Aug 14, 2023 at 0:51
  • 1
    $\begingroup$ I replaced 8 with $8k$. $\endgroup$ Aug 14, 2023 at 7:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .