# Proof that $a,r,s$ are odd and $b$ is even

I was trying to do this proof where:

Assume $a,b,r,s$ are relatively prime, and that $$a^2+b^2=r^2$$ and $$a^2-b^2=s^2$$ Prove that $a,r,s$ are odd and $b$ is even.

So I started off by saying that if a number $x^2$ is odd, then $x$ is odd. Same applies for even numbers. Then I said that both $a$ and $b$ can't be even at the same time, and can't be odd, since if they are both odd, $r$ and $s$ will both be even. But then $b$ can be odd while $a$ is even and vice versa: both $r$ and $s$ will be odd. Am I missing something?

Thanks

• Prove $b$ is even first, by looking at the equation modulo $4$ and seeing that $r^2-2b^2=s^2$. – Thomas Andrews Mar 31 '15 at 1:04

So as you say, $a,b$ can't both be even (given that they're relatively prime) and they can't both be odd, since then $r,s$ would both be even (but must be relatively prime).
Then exactly one of $a,b$ is even. Up until here you did well, but next $a$ can't be even with $b$ odd, since then $s$ is odd, but $$s^2+b^2=(2s_1+1)^2+(2b_1+1)^2=4(s_1^2+s_1+b_1^2+b_1)+2\neq a^2=(2a_1)^2=4a_1^2$$ because of divisibility by $4$.
Thus $b$ is even, $a$ is odd. So $s$ is odd and $r$ is odd.