I'm working through a little proof of this statement, and here is an excerpt of the problem I'm following:
Suppose $p \equiv 1\pmod{4}$. Show that if $x^2-py^2=1$ the $x$ is odd and $y$ is even. Suppose that ${x_0}^2-p{y_0}^2=1$ with $y_0>0$, $y_0$ minimal. Show that $gcd(x_0+1,x_0-1)=2$. Deduce that one of two cases arises: Case 1: $x_0-1=2pu^2$, $x_0+1=2v^2$. Case 2: $x_0-1=2u^2$, $x_0+1=2pv^2$. Show that in Case 1, $v^2-pu^2=1$ with $|u|
I note that $0$ and $1$ are the only squares modulo $4$, thus $x^2$ and $y^2$ can only take values $0,1$ modulo $4$. Then mod 4, $x^2-py^2=1$ reduces to $x^2-y^2=1$, and this can only occur when $x^2\equiv 1$, $y^2\equiv 0$, and thus $x$ is odd, and $y$ is even.
Furthermore, since $x_0$ is then odd, $x_0-1$ and $x_0+1$ are both even, so their gcd is at least $2$. Also, any common divisor must divide $(x_0+1)-(x_0-1)=2$, and so the gcd is 2.
But I'm not sure why the two cases must arise, as I'm not sure what $u,v$ are. My guess is they are coprime factors of $y_0$? I'm thinking this because since $y_0$ is even, $y_0=2uv$ for some factors $u,v$ of $y_0$. Then $(x_0-1)(x_0+1)=p{y_0}^2=4pu^2v^2=(2v^2)(2pu^2)$? Is this the right train of thought? I'm not sure why it should follow that $(x_0+1),(x_0-1)$ must each be equal to one of $(2u^2),(2pv^2)$, and not some other arrangement. Is it because this is the only way to group the factors such that their products have gcd $2$? If so, I don't see why $u$ or $v$ would be coprime to $p$. Thanks for any explanation.
After this, I believe I can show the remaining steps of the problem.