# Math Help - Quadratic residue -5

1. ## Quadratic residue -5

Hey, so the problem is to find all primes for which -5 is a quadratic residue.
If one can tell me the answer I can probably prove it (using Gauss Lemma or Legendre symbol or so), but so far the primes seem to be randomly distributed.

I have that -5 is a quadratic residue for p = 2, 3, 5 (trivial / exceptional cases)
and for p = 7, 23, 29, 41, 43, 47, 61, 67...

and -5 is a quadratic non-residue for p = 11, 13, 17, 19, 31, 37, 59...

Now while writing this I noticed that its true for even 10th powers and false for odd 10th powers. Is that the solution?

2. $\left(\frac{-5}{p}\right) = \left(\frac{-1}{p}\right)\left(\frac{5}{p}\right) = (-1)^{\frac{p-1}{2}}(-1)^{\left\lfloor \frac{p+2}{5}\right\rfloor}$.

http://en.wikipedia.org/wiki/Legendr...egendre_symbol

3. How do you get
$\left(\frac{-1}{p}\right) =(-1)^{\frac{p-1}{2}} ?$

EDit: I found it on wiki, thanks a lot!

4. Euler's Criterion.