I'm learning about quadratic reciprocity and I'm stuck on an exercise. It states :
Determine the congruence characterizing all prime numbers p for the following integers such that they are quadratic residues mod p
(a) 5
(b) -5
(c) 7
(d) -7
An example they gave involving a Legendre symbol was : $(\frac{-2}{p}) = 1$ iff $p \equiv 1,3 \ (mod\ 8)$
I'm not really sure how to approach this. Is there a general method I should be following?
Do I examine the problem in terms of Legendre symbols and their properties?