Sum of two perfect squares is also a perfect square. Proof that one of these numbers is divisible by 3

divisibilityelementary-number-theorysquare-numberssums-of-squares

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

Best Answer

Squares are $0$ or $1$ modulo $3$, so a sum of two of the latter can't be a square.