PellEquation Challenging

Problem - 2312

If $p$ is a prime of the form $4k+3$, show that exactly one of the equations $x^2-py^2=\pm 2$ has an integral solution.


Let $(x_1, y_1)$ be the fundamental solution of the corresponding Pell's equation. If $x_1\pm 1$ are not coprime, the equality $(x_1+1)(x_1-1)=py_1^2$ gives us $x_1\pm1 = 2x^2$ and $x_1\mp 1=2py^2$, which is impossible in either case. Hence $x_1\pm 1$ are coprime, which implies $x_1\pm 1=x^2$, $x_1\mp = py^2$, and $x^2-py^2=\pm 2$.

report an error