For a Diophantine equation $x^2+py^2=z^2$ show that $z$ is necessarily odd. For a Diophantine equation $x^2+py^2=z^2$ where $p$ is a prime of the form $p\equiv 1(mod4)$ and $(x,y,z)=1$.
Show that $z$ is necessarily odd.

Suppose to the contrary that $z$ is even. 
If $y$ is even, then $x^2$ is even, so $x$ is even, contradicting the fact that $\gcd(x,y,z)=1$. Similarly, if $x$ is even, then $py^2$ is even, and since $p$ is odd $y^2$ is even, and therefore $y$ is even, and again $\gcd(x,y,z)\gt 1$.
So $x$ and $y$ are both odd. Thus $x^2\equiv 1\pmod{4}$ and $y^2\equiv 1\pmod{4}$, and therefore $x^2+py^2\equiv 2\pmod{4}$. This is impossible, since any even square is congruent to $0$ modulo $4$.
