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.
 A: 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$.
A: For the equation:  
$$x^2+py^2=z^2$$  
There is a solution.  
$$x=t^2-pk^2$$  
$$y=2tk$$  
$$z=t^2+pk^2$$  
Means it is necessary to rewrite the equation in the form. $p=4s+1$
$$x^2+(4s+1)y^2=z^2$$
This is possible if the number of $x,y - $ odd.
Means:  $$z=\frac{t^2+(4s+1)k^2}{2}$$
and the numbers $t,k - $ always odd.  Imagine the numbers.
$$t=2t+1$$
$$k=2k+1$$
We substitute in the formula and find out what the parity of the number $z$.
$$z=2s(2k+1)^2+2(t^2+k^2)+2(t+k)+1$$
This number is always odd! With the high value of the coefficient.
