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 p and q are primes, p = 2 q + 1 , and 0 < m < ( p + 1 ) 1 2 , then m is a primitive root ( mod p ) if and only if it is a quadratic nonresidue ( mod p ) .

Answers

Proof. Let p and q be primes such that p = 2 q + 1 .

If m is a primitive root modulo p , then m is a quadratic nonresidue by Problem 21.

Conversely, suppose that m is a quadratic nonresidue modulo p . I prove a stronger proposition : if 0 < m < p 1 , then m is a primitive root (we must exclude p 1 , since p 1 1 ( mod p ) has order 2 , so is not a primitive root). This is stronger, because ( p + 1 ) 1 2 p 1 ( 0 p ( p 3 ) ).

Fix g a primitive root modulo p . By Problem 11, m g t ( mod p ) for some odd integer t , where 0 < t < p 1 . Let o ( x ) denote the order of an element x modulo p , if p x . Then o ( g ) = p 1 , and by Lemma 2.33,

o ( m ) = o ( g t ) = o ( g ) t o ( g ) = p 1 t ( p 1 ) = 2 q t ( 2 q ) .

Since t is odd, t ( 2 q ) = t q , so we obtain

o ( m ) = 2 q t q .

Assume for contradiction that t q 1 . Since q is prime, q t , so t = qs for some integer s . Since 0 < t < p 1 = 2 q , we obtain s = 1 , thus t = q = ( p 1 ) 2 . Then m g t g ( p 1 ) 2 ( mod p ) , thus m 2 1 ( mod p ) , and m 1 ( mod p ) , otherwise g is not a primitive root, thus m 1 ( mod p ) . This is impossible if 0 < m < p 1 . Therefore t q = 1 , so that o ( m ) = 2 q = p 1 . Thus m is a primitive root.

(Note that if p 5 , p 3 ( mod 4 ) , so that 1 is always a quadratic non residue modulo p , except p = 5 .)

If p = 2 q + 1 , where p , q are prime numbers, every quadratic nonresidue m modulo p , except m 1 ( mod p ) , is a primitive root modulo p . □

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 m modulo p = 167 , except p 1 , are primitive roots.

Verification for all primes p < 10000 such that q = ( p 1 ) 2 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!

User profile picture
2024-10-21 10:27
Comments