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$.
A couple of points:
1) The negation of "$a$ and $b$ are both divisible by $3$" is "at least one of $a$ or $b$ is not divisible by $3$".
2) You don't need divisibility by $9$ to prove a contradiction. Divisibility by $3$ will do.