# How to prove a fact about the sum of three squares?

How would I go about proving the following?

If $a$, $b$, $c$, $n$ are positive integers, then

$a^2+b^2+c^2 \neq 2^nabc$

I tried doing something similar to the proof for Adrien-Marie Legendre's Three Square theorem: $a^2+b^2+c^2=n$ iff there are not integers $k$, and $m$ so that $n=4^k(8m+7)$. It didn't quite work out...

$2^nabc$ is always even. So if $a^2+b^2+c^2 = 2^nabc$, then $a^2+b^2+c^2$ must be even.

That means there is $a_1$, $b_1$, $c_1$ so that $a = 2a_1$, $b = 2b_1$, and $c = 2c_1$

So $(2a_1)^2+(2b_1)^2+(2c_1)^2 = 2^nabc \rightarrow 2(2a_1^2+2b_1^2+2c_1^2)= 2^nabc$

and we get $2a_1^2+2b_1^2+2c_1^2= 2^{n-1}abc$

We can continue to do this procedure with $a_2$, $b_2$, $c_2$ then $a_3$, $b_3$, $c_3$ then ... $a_n$, $b_n$, $c_n$.

With $a_n$, $b_n$, $c_n$ we'd get

$2^na_n^2+2^nb_n^2+2^nc_n^2= 2^{n-n}abc=abc$

Since $a_n=2a_{n-1}$ and $a_0=a$,

$a_n = \frac{a}{2^n}$

and we get

$2^n(\frac{a}{2^n})^2+2^n(\frac{b}{2^n})^2+2^n(\frac{c}{2^n})^2=abc$

This just becomes the original equation. $a^2+b^2+c^2 = 2^nabc$

-
I suppose I could just use Legendre's theorem to complete the proof: $2^nabc$ is the sum of three squares iff there are integers $k$ and $m$ so that $4^k(8m+7)=2^nabc$ We can pull out a power of 4: $2^nabc=2^{\frac{n}{2}}2^{\frac{n}{2}}abc=4^\frac{n}{2}abc$, but $abc$ cannot be represented as $8m+7$ because $abc$ is even and $8m+7$ is odd. – objectivesea Nov 2 '11 at 8:24
You have the theorem reversed: a positive integer is a sum of three squares if and only if it is not of the form $4^n (8m+7).$ – user7530 Nov 2 '11 at 8:32

Since the right-hand side is even, either exactly one or all three of $a,b,c$ must be even.

The former case is impossible, as you can easily see by taking both sides mod 4.

In the latter case, let $2^k$ be the greatest power of 2 in the GCD of $a,b,c$. Then

$$\left(\frac{a}{2^k}\right)^2 + \left(\frac{b}{2^k}\right)^2 + \left(\frac{c}{2^k}\right)^2 = 2^{n+k} \frac{a}{2^k} \frac{b}{2^k} \frac{c}{2^k},$$ with at least one of the terms on the left-hand side odd, and we are back in case 1.

EDIT: Note that $n>0$ is essential. When $n=0$, $$3^2 + 3^2 + 6^2 = 54 = 3\cdot3\cdot6.$$

-
@Phira $n$ is a positive integer. – user7530 Nov 2 '11 at 14:23
I'm trying to figure out why the final step is permissible. $2^{n+k}\frac{a}{2^k}\frac{b}{2^k}\frac{c}{2^k}=2^nabc$, but $(\frac{a}{2^k})^2+(\frac{b}{2^k})^2 +(\frac{c}{2^k})^2 \neq a^2+b^2+c^2$ unless $k=0$. – objectivesea Nov 2 '11 at 15:44
Since each of $a, b,$ and $c$ are divisible by $2^k$, both sides of the equation must be divisible by $2^{2k}$. Carrying out this division gives the equation in my answer. The right-hand side in your comment above is incorrect: it should be $2^{n-2k}abc$. – user7530 Nov 2 '11 at 15:57
@Phira No, you can't include this case, as the statement is false when $n=0$. I've added a counterexample to my answer. – user7530 Nov 2 '11 at 16:12
Thanks. Will delete my comments. – Phira Nov 2 '11 at 18:21

To go from $a^2+b^2+c^2$ even to $a,b,c$ even in this case, you need an argument, although it is true for $n$ strictly positive.

You should try to express your equation for only $a_k$, $b_k$ and $c_k$, then you will see that your argument does not end after $n$ steps. Either, you argue with infinite descent or equivalently, you divide immediately by the largest factor of 2 possible.

-