TITLE: Show divisibility by 7
QUESTION [12 upvotes]: I was stuck at this question:

Suppose $a^2+b^2=c^2$ for $a,b,c \in \mathbb Z$, and neither $a$ nor $b$ is a multiple of 7. Show that $a^2-b^2$ is a multiple of 7

I tried to write $b^2$ as $c^2-a^2$ then get $a^2-b^2=2a^2-c^2$. But this does not seem to generate the solution.
How to solve problems like this, am I missing some theorems concerning Pythagoras numbers?

REPLY [5 votes]: Using Euclid's formula, $a=2mn, b=m^2-n^2$
We have $7\nmid2mn(m^2-n^2)$
Now, $(m^2-n^2)^2-(2mn)^2=m^4+n^4-6m^2n^2\equiv m^4+n^4+m^2n^2\pmod7$
But $(m^2-n^2)(m^4+n^4+m^2n^2)=(m^2)^3-(n^2)^3\equiv1-1\pmod7$ using Fermat's Little Theorem as $(m,7)=(n,7)=1$
$\implies7|(m^4+n^4+m^2n^2)$ as $7\nmid(m^2-n^2)$
Can you take it from here?