If $a^{2} + b^{2} = c^{2}$ then show that $ 3 | ab $
Attempt
I'll try by contradiction. If $3$ does not divide $ab$ then $ab = 3m + n$.
So we have $$ (a+b)^{2} = a^{2} + b^{2} + 2ab = a^{2} + b^{2} + 6m + 2n $$ $$ a^{2} + b^{2} = (a+b)^{2} - 2(3m + n) $$
how to show that $(a+b)^{2} - 2(3m + n)$ cannot be a square number?
If $3\nmid ab$ then $3\nmid a$ and $3\nmid b$ so $a^2\equiv 1\mod 3$ and $b^2\equiv 1\mod 3$. Hence $$c^2=a^2+b^2\equiv 2\mod 3,$$ which is impossible.