# Prove that if we decrease by 7 the sum of squares of any three natural numbers, then the result cannot be divisible by 8.

I did like this.... $$a^2+b^2+c^2\equiv7(mod 8)$$ or,$$a^2+b^2+c^2+1\equiv0(mod 8)$$ This further implies that 8 divides the sum of the remainders of $$a^2$$, $$b^2$$, $$c^2$$ and 1 on dividing by 8. Now, square of any natural number gives remainders 0,1 or 4 on dividing by 8. By trial and error, we see that the sum of the remainders is never divisible by 8, for any combination of remainders. Hence, proved. But, can please somebody provide me a more elegant proof,by excluding my trial and error part? Thanks, in advance.

## 2 Answers

Squares have a remainder of $$0$$, $$1$$ or $$4$$ when divided by $$8$$. Thus, the sum of $$3$$ squares can only have a remainder of between $$0$$ to $$6$$, inclusive, when divided by $$8$$ and, as such, it can never be $$7$$.

As you already concluded, the square of any natural number has a remainder of 0, 1, or 4 when divided by 8.

You can avoid needing to check every possible combination of three remainders by categorizing these combinations into four cases:

• None of the remainders are 4: the maximum possible total is 1+1+1=3
• One of the remainders is 4: the maximum possible total is 4+1+1=6
• Two of the remainders are 4: since 4+4=0 (mod 8), the maximum possible total is 1
• All three remainders are 4: the total is 4+4+4=4 (mod 8)

In none of these cases is it possible for the remainders to sum to 7.