Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2005/ii/paper-2/1h/solution

Let generate the cyclic group of nonzero residues, whose order is a power of two. Write . Its multiplicative order is , so it is a primitive root precisely when is odd. The quadratic residues are exactly the even powers of . Thus the primitive roots are precisely the quadratic nonresidues, with nonzero residue classes understood.
For , , so quadratic reciprocity gives . Since and alternates between and modulo three, is respectively or modulo seven. The nonzero squares modulo seven are . Consequently , and
There is a genuine endpoint exception if the printed form permits : then and , which has order one and is not primitive. The first equivalence remains true for , but the final assertion requires excluding that prime.

New to topics? Read the docs here!