Sum of squares of integers divisible by 3 Suppose that $n$ is a sum of squares of three integers divisible by $3$. Prove that it is also a sum of squares of three integers not divisible by $3$.
From the condition, $n=(3a)^2+(3b)^2+(3c)^2=9(a^2+b^2+c^2)$. As long as the three numbers inside are divisible by $3$, we can keep pulling out a factor of $9$, until we get $n=9^k(x^2+y^2+z^2)$. Modulo $3$, squares leave a remainder of either $0$ or $1$. Therefore one or three of $x,y,z$ are divisible by $3$.

Induction on the power of $9$ dividing the number. Begin with any number not divisible by $9,$ although it is allowed to be divisible by $3.$ The hypothesis at this stage is just that this number is the sum of three squares, say $n = a^2 + b^2 + c^2.$ Since this $n$ is not divisible by $9,$ it follows that at least one of $a,b,c$ is not divisible by $3.$ Let us order so that we can demand $c$ not divisible by $3.$ If $a+b+c$ is divisible by $3,$ replace it by $-c$ and use the same name. We now have 
$$ a + b + c \neq 0 \pmod 3. $$
Induction: let $n = a^2 + b^2 + c^2,$ with $a+b+c \neq 0 \pmod 3.$ Then
$$  9n = (a-2b-2c)^2 + (-2a+b-2c)^2 + (-2a-2b+c)^2,  $$
where all three summands are nonzero $\pmod 3.$ We can multiply by another $9,$ then another, and so on. 
The formula is $- \bar{q} p q $ in the quaternions with rational integer coefficients, where $q=i+j+k$ and $p= ai+bj+ck.$ 
