How many ways can $2^{2012}$ be expressed as the sum of four (not necessarily distinct) positive squares?

155 Views Asked by At

How many ways can $2^{2012}$ be expressed as the sum of four (not necessarily distinct) positive squares? Thanks!

For those curious, the solution which I have trouble comprehending is item 2 from the PUMaC 2012 NT Contest.

The solution verbatim:

We have the equation $a ^2$ +$b ^2$ +$c ^2$ +$d ^2$ = $2^{2012}$. First, consider the problem modulo $4$. The only residues of squares modulo $4$ are $0 $ and $1$. If all of the squares have residues of 1 modulo 4, then they are all odd and we consider the problem modulo $8$. The only residues of squares modulo $8$ are $0, 1$, and $4$, and because $2^{2012} ≡ 0 \pmod 8$, we see that the squares cannot all be odd, so they must all be even. If all of the squares are even, then we divide both sides by $4$ and repeat the process. We see that the only solution is $a = b = c = d = 2^{1005}$ , so there is only 1 solution.

Notice that the solution mentions that $a,b,c$, and $d$ all being $1 $ modulo $4$ is not possible because $2^{2012}$ is $0$ modulo $8$. However, what if $a^2,b^2,c^2,d^2$ were $5,1,1,$ and $1$ modulo $8$ respectively? All $4 $variables will be odd, can satisfy $1$ modulo $4$, as well as satisfy the condition of $0$ modulo $8$. So how is this reasoning valid? (I know I must have some logistical error since Princeton University is always right, but I don't know where my logic is wrong) Thanks, everyone.

Edit: I realized that my question was wrong and I think I understand now.

1

There are 1 best solutions below

0
On BEST ANSWER

By Jacobi's four-square theorem, the number of solutions where the squares may be of zero or negative numbers and where order matters is $24$ times the sum of odd divisors of $2^{2012}$. But the only odd divisor of $2^{2012}$ is $1$, so there are $24$ solutions in the generalised sense. We can easily list them all out: they are all permutations and sign choices of $$(\pm2^{1006})^2+0^2+0^2+0^2$$ and $$(\pm2^{1005})^2+(\pm2^{1005})^2+(\pm2^{1005})^2+(\pm2^{1005})^2$$ So, when it comes to all positive squares, there is only one solution. $$2^{2012}=(2^{1005})^2+(2^{1005})^2+(2^{1005})^2+(2^{1005})^2$$