Prove: $\text{if }a,b,c\in\mathbb{Z} \text{ and } a^2+b^2=c^2\text{ then }3\mid ab$ This is for a homework assignment.  I am supposed to prove,
$$\text{if }a,b,c\in\mathbb{Z} \text{ and } a^2+b^2=c^2\text{ then }3\mid ab$$
I've tried using direct proofs and proofs by contrapositive, but I can't seem to get anywhere. Is there a good approach to prove this, preferably without modulus?

If $a$ is not a multiple of $3$, then one of $a+1$, $ a-1$ is. Hence $3\mid (a+1)(a-1)=a^2-1$. Similarly, if $b$ is also not a multiple of $3$, we have $3\mid b^2-1$.
Hence if neither $a$ nor $b$ is a multiple of $3$, then $3\mid a^2-1+b^2-1=c^2-2$. Then $c^2$ (and $c$) is not a multiple of $3$, so $3\mid c^2-1$. But then also $3\mid (c^2-1)-(c^2-2)=1$. Contradiction. We conclude that at least one of $a,b$ must be a multiple of $3$.
