<s>[INST] Let $\ a,b,c$ be integers such that $ \ a^{2} + b^{2} = c^{2}$. If $c$ is divisible by $3$, prove that $a$ and $b$ are both divisible by $3$. Question:
Let $\ a,b,c$ be integers such that $ \ a^{2} + b^{2} = c^{2}$. If $c$ is divisible by $3$, prove that $a$ and $b$ are both divisible by $3$. 
My attempt:
Proof by contradiction:
Assume $c$ is divisible by $3$ and $a$ or $b$ is not divisible by $3$. 
Since $c$ is divisible by $3$ we can write $c$ as $ \ c = 3m \implies c^{2} = 9m^{2} \implies 9 | c^{2}$.
Since $a$ and $b$ are not divisible by $3$, $\ a = 3k+1$ and $ \ b = 3n+1$ for some integers $\ k,n.$
Then,
$ a^{2} + b^{2} = (3k+1)^{2} + (3n+1)^{2} = 9k^{2} + 6k +9n^{2} + 6n + 2$.
I am stuck here. I can't find a contradiction. How can I show that $ a^{2} + b^{2} $ is not divisible by $9$.
 [/INST] $$n^2\equiv(0,1,-2,4)mod9.$$ It's all!
</s>