# Diophantine congruence equation

Prove the equation $$x^2+17y^2 \equiv 257 \pmod p$$ has integer solutions modulo $p$ for every prime $p$.

Note: The case $p=2$ is trivial.

If $p$ is odd and $p \nmid 257-17y^2$ I tried to consider quadratic residues $\pmod p$, it's thus equivalent to show $\left(\frac{257-17y^2}{p}\right)=(257-17y^2)^{\frac{p-1}{2}}=1$ for some $y \in \mathbb{Z}_p$.But how to deduce the existence of $y$?

-

Count the number of numbers of the form $257-x^2$ modulo $p$; count the number of numbers of the form $17y^2$ modulo $p$; apply the pigeonhole principle. You may have to make a special case for a prime or two.