Solution
= Solution
For odd $p\ne5$, <quadratic reciprocity> has no sign factor because $5\equiv1\pmod4$:
$$
\left(\frac5p\right)=\left(\frac p5\right).
$$
The nonzero squares modulo $5$ are $1,4$, so the answer for odd primes is $p\equiv1,4\pmod5$. The excluded-prime wording also allows $p=2$, where $5\equiv1$ has a square root. Thus the full answer is
$$
\boxed{p=2\quad\text{or}\quad p\equiv1,4\pmod5}.
$$