Exercise

a) Find all the quadratic residues modulo 19.
b) How many quadratic residues are there modulo 31?
c) Show that the congruence

has a solution modulo any prime.

Question

Let

be a prime (n>0).

Show that a is a quadratic non-residue modulo p if and only if a is a primitive root modulo p.