I need to determine all primes p for which -5 is a quadratic residue modulo p. The original question is
Find the odd primes which divide integers of the form $n^2+5$ ?
My try:
what I obtain is ... $$n^2 \equiv (-5) \mod p$$ I know how to solve $n^2 \equiv 5 \mod p$ what is the difference if it is replaced by -5 . Does it mean... every prime of the form $$p=\pm 1 , \pm3 \mod 10 ??$$
We have the Legendre symbol $$\left(\frac{-5}p\right)=\left(\frac5p\right)\left(\frac{-1}p\right)=+1$$
There are two main cases:
Therefore, the odd primes that are factors of $n^2+5$ are $5$ and those congruent to $1,3,7,9\bmod20$.