TITLE: Pell type equation: $x^2-py^2=a$
QUESTION [5 upvotes]: Let $p=4k+1$ be a prime number such that $p=a^2+b^2$, where $a$ is an odd integer.Prove that the equation $$x^2-py^2=a$$ has at least a solution in $\mathbb{Z}$.

REPLY [4 votes]: See e.g. Gary Walsh, On a question of Kaplansky".