Let $p=4k+1$ be a prime number such that $p=a^2+b^2$ , with $a$ an odd integer. Prove that the equation $$x^2-py^2=a$$ has at least a solution in $\mathbb{Z}$.
Only a little progress (maybe useless): for any prime divisor $q$ of $a$, we get $(\frac{q}{p})=1$ through Guass' quadratic reciprocity law, which suggests $(\frac{a}{p})=1$.