How to show that if $9n^2=a^2+b^2$, $a$ and $b$ are multiples of $3$ To be honest, I don't know where to start with this problem:
Let $n\in \mathbb{N}$. Prove that if $9n^2$ is the sum of two perfect squares $(a^2,b^2)$, then $a$ and $b$ are multiples of $3$.

To clarify on vadim's answer after concluding that $$\cases{0^2=0\equiv 0\mod3 \\1^2=1\equiv 1\mod3 \\2^2=4\equiv 1\mod3  }$$
we can make a table of all combinations:
$$\begin{array}{|cc|cc|}\hline a(mod3)&b(mod3)&a^2(mod3)&b^2(mod3)\\\hline
0&0&0&0\\0&1&0&1\\0&2&0&1\\1&0&1&0\\1&1&1&1\\1&2&1&1\\2&0&1&0\\2&1&1&1\\2&2&1&1\\\hline\end{array}$$
we can see that the only way to sum to something divisible by 3 is the first, where both combinations are $0\mod 3$
