Homepage › Solution manuals › Ivan Niven › An Introduction to the Theory of Numbers › Exercise 3.1.22* (Primitive roots modulo $p$, if $p = 2q +1$, where $p,q$ are prime numbers.)
Exercise 3.1.22* (Primitive roots modulo $p$, if $p = 2q +1$, where $p,q$ are prime numbers.)
Show that if and are primes, , and , then is a primitive root if and only if it is a quadratic nonresidue .
Answers
Proof. Let and be primes such that .
If is a primitive root modulo , then is a quadratic nonresidue by Problem 21.
Conversely, suppose that is a quadratic nonresidue modulo . I prove a stronger proposition : if , then is a primitive root (we must exclude , since has order , so is not a primitive root). This is stronger, because ( ).
Fix a primitive root modulo . By Problem 11, for some odd integer , where . Let denote the order of an element modulo , if . Then , and by Lemma 2.33,
Since is odd, , so we obtain
Assume for contradiction that . Since is prime, , so for some integer . Since , we obtain , thus . Then , thus , and , otherwise is not a primitive root, thus . This is impossible if . Therefore , so that . Thus is a primitive root.
(Note that if , , so that is always a quadratic non residue modulo , except .)
If , where are prime numbers, every quadratic nonresidue modulo , except , is a primitive root modulo . □
Verification with Sage.
sage: q, p = 83, 167 sage: nr = [a for a in range(p) if kronecker(a,p) == -1] sage: l = [] sage: for a in nr: ....: l.append(Mod(a,p).multiplicative_order()) sage: print(l) [166, 166, 166, 166, ..., 166, 166, 2]
This shows that all nonresidues modulo , except , are primitive roots.
Verification for all primes such that is prime :
sage: pr = prime_range(10000) sage: prem = [p for p in pr if is_prime((p-1) // 2)] sage: for p in prem: ....: for a in range(2, p-1): ....: if kronecker(a, p) == -1 and Mod(a,p).multiplicative_order() != p-1: ....: print(a,p) sage:
No counterexample to our proposition!