# Determine all primes $p > 5$ such that 10 is a quadratic residue mod p

Did this for the case for $5$ is a quadratic residue.

That is, the problem equivalently says that we want to find all $p > 5$ for which $(\frac{5}{p}) = 1$. So using reciprocity, rewrite as $\left(\frac{p}{5} \right)$, which $=1$ when $p$ is quadratic residue modulo $5$. So $p \equiv 1\pmod 5$ or $4 \pmod 5$.

Now for the case of $10$ a quadratic residue $mod\ p$. The problem equivalently says that we want to find all $p > 5$ for which $(\frac{10}{p}) = 1$. We can write $(\frac{10}{p}) = (\frac{5}{p})(\frac{2}{p})$, and the former, we know from above, and the latter $= 1$ when $p \equiv \pm 1 \pmod 8$.

So to finish off the question, do I stitch together the solutions using C.R.T? Do I just say it's solutions where $p \equiv \pm 1 \pmod 8$ and $p \equiv \pm 1 \pmod 5\ or\ 4 \pmod 5$?

• Keep in mind, $({10\over p})=1$ if $({5\over p})=({2\over p})=-1$ as well. – Barry Cipra Apr 8 '18 at 20:34
• Oh yeah, forgot about that case. So the solutions I mentioned above plus the case where $(\frac{5}{p})$ and $(\frac{2}{p})$ are both quadratic non residues. – SS' Apr 8 '18 at 20:40