Sum of two perfect squares is also a perfect square. Proof that one of these numbers is divisible by 3 At first, I tried to proof by contradiction: I considered two numbers that are not divisible by $3$. Than I tried to write consecutive perfect squares that are divisible by $3$ to see some pastern, but it didn't get me anywhere. Then i tried to make express each whole number a,b and c under the condition that $a^2+b^2=c^2$ in terms of two arbitrary integers. I found out that $a$ has to be of the form $2mn$ and $b$ has to be of the form $m^2-n^2$, where $m$ and $n$ are whole numbers. So that I have to prove that either $2mn$ or $m^2-n^2$ is divisible by $3$. I got stuck at this point and don't know how to prove that, so help me please

HINT. Write $c^2=a^2+b^2$ and consider the equation $\mod 3$, remembering that $x \equiv 0 \mod 3$ implies that $x$ is divisible by $3$.
