Can a Sum of distinct squares ever equal power of two

elementary-number-theory

Does there exist $2^t,\ t\in\mathbb{Z}_+$ which can be express as Sum of two or more distinct square number.

Or

Can it be shown that

$$\begin{split}2^t &\ne \sum a_i^2 = a_1^2+ a_2^2+\cdots+a_n^2\end{split}$$

Where $n\ge 2$ and $\{a_i,t\}\in\mathbb{Z}_+$ and $a_i \ne a_j$ for $1\le i,j \le n$

Example: $2^6=64=7^2+3^2+2^2+1^2+1^2$ here $1^2$ repeat two times so this is not allowed.

My incomplete attempt for arithmetic squares

Edit: check related new post, Can a sum arithmetic square ever equal to power of two?

Let $n,u,d\in\mathbb{Z}_+$

$$\begin{split}\sum_{q=0}^u (n+qd)^2 &=n^2+(n+d)^2+(n+2d)^2+\cdots+(n+ud)^2\\ &=n^2(u+1)+\frac{(u+1)u}{2}(2nd+d^2)+\frac{(u+1)u(u-1)}{3}d^2 \end{split}$$

Let
$$\begin{split}2^t &=\sum_{q=0}^u (n+qd)^2 \\ \implies 3\cdot 2^{t+1}&=6n^2(u+1)+3(u+1)u(2nd-d^2)+(u+1)u(u-1)2d^2 \\ &= (u+1)(6n^2+3u(2nd+d^2)+u(u-1)2d^2)\\ &(in\ case,\ u+1= 3) \\
\implies 2^t&= 3n^2+3(2nd+d^2)+2d^2\\ &= n^2+(n+1)^2+(n+2d)^2 \end{split}$$

Now we need to simplify for case, $6n^2+3u(2nd+d^2)+u(u-1)2d^2=3\cdot2^x$ and $u+1=2^y$ where $x+y=t+1$ but I'm stuck here. Thank you.

Related post:

Can a sum of consecutive $n$th powers ever equal a power of two?

Best Answer

Counterexample: For $t=8, n = 5$ and $(a_1,a_2,a_3,a_4,a_5)=(1,5,7,9,10)$ we have:

$$2^8=1^2+5^2+7^2+9^2+10^2$$