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?