0% found this document useful (0 votes)
10 views

Primitive_Roots___Modular_Arithmetic

Uploaded by

pajemi7756
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Primitive_Roots___Modular_Arithmetic

Uploaded by

pajemi7756
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Orders and Primitive Roots

Modular Arithmetic
by Equation Tracker

1 Orders
Definition 1.1 (Orders). Let a, p ∈ N such that p is a prime and a ̸≡ 0 (mod p).
Then the smallest positive integer k such that ak ≡ 1 (mod p) is called Order of
a modulo p. We will denote it as Op (a) = k.

We can see that if an ≡ 1 (mod p) then Op (a) | n. Also the converse is true.
As p is prime and gcd (a, p) = 1, by Fermet’s little theorem, we always have that
ap−1 ≡ 1 (mod p). Hence, there always exist Op (a) for every a coprime to p.

Theorem 1.1. If a, p, n ∈ N such that p is a prime and a ̸≡ 0 (mod p). Then we


have,
an ≡ 1 (mod p) ⇐⇒ Op (a) | n
Proof. If Op (a) | n. Then n = k · Op (a). Which implies
 k
n k·Op (a) Op (a)
a =a = a ≡1 (mod p)

Now suppose an ≡ 1 (mod p). Assume for contrary, Op (a) ∤ n. Then n = k·Op (a)+r
where 0 < r < Op (a). So,
 k
n k·Op (a)+r Op (a)
a =a = a · ar ≡ ar ≡ 1 (mod p)

but 0 < r < Op (a) which is a contradiction. And therefore Op (a) | n as desired.

Corollary 1.2 (Orders are Multiplicative). Let a, b ∈ N such that Op (a) = x and
Op (b) = y. If gcd(x, y) = 1, then

Op (ab) = xy

Proof. It’s not hard to check that (ab)xy ≡ 1 (mod p). So, Op (ab) = n | xy. But
gcd(x, y) = 1. Therefore we conclude that, n = x′ y ′ where x′ | x and y ′ | y. We
have
 x
x′ y ′ x′ y ′ x′ ′ ′ ′ ′
(ab) ≡ 1 (mod p) =⇒ (ab) = (ab)xy ≡ (ax )y · bxy ≡ bxy ≡ 1 (mod p)

Hence, Op (b) = y | xy ′ . But y ∤ x =⇒ y | y ′ . Previously, we had y ′ | y which means


y = y ′ . Similar calculation gives x = x′ and we are done.

1
Corollary 1.3. We always have,

Op (a) | p − 1

Prove it yourself. Here is another problem left for the reader.


Problem 1.1
n
Let p be a prime. If p | 22 + 1, prove that 2n+1 | p − 1.

2 Primitive Roots
Primitive roots are really interesting. We’ve already talked about orders. What if
Op (a) = p − 1? If order of a mod p is p − 1, then a is called a primitive root modulo
p. This means none of {a1 , a2 , . . . , ap−2 } is congruent to 1 mod p. In fact, we can
say more. They all are different.
Definition 2.1 (Primitive Roots). Let a, p ∈ N with p be a prime and a ̸= 1. If
Op (a) = p − 1, then such a is called a Primitive Root modulo p.
Lemma 2.1.1. Let b be a primitive root mod p. Then

{b1 , b2 , . . . , bp−1 } ≡ {1, 2, . . . , p − 1} (mod p)

Proof. We know that none of {b1 , b2 , . . . , bp−2 } is congruent to 1 mod p. Now if


bi ≡ bj (mod p), then bi−j ≡ 1 (mod p) (Assuming i > j). But as 0 < i, j < p − 1,
0 < i − j < p − 1 which is a contradiction. Hence we are done.
The next theorem states that for any odd prime p, there always exists primitive
root mod p. The proof for this is not easy. However, you can just state this on a
contest without proof.
Theorem 2.1 (Primitive roots always exists). Let p > 2 be a prime. Then there
always exists primitive root modulo p.
Proof. Let p − 1 = q1α1 · q2α2 · · · · · qnαn where qi is prime for 1 ≤ i ≤ n. Now by
Lagrange’s Theorem of Polynomials, we know that the polynomial
α1
xq1 ≡ 1 (mod p)
α1 α1 −1
has exactly q1α1 solutions. If Op (x) = q1α1 , then xq1 ≡ 1 (mod p) and xq1 ̸≡ 1
α1 α1 −1 α−1
(mod p). There exists total q1 − q1 = q1 (q − 1) > 0 solutions. In other words,
there always exists x such that Op (x) = q1α1 .
Now let {x1 , x2 , . . . , xn } such that Op (xi ) = qiαi for all 1 ≤ i ≤ n.
α
As gcd(qiαi , qj j ) = 1, We can say that

Op (x1 x2 . . . xn ) = Op (x1 ) · Op (x2 ) . . . Op (xn ) = q1α1 · q2α2 · · · · · qnαn = p − 1

And hence g = x1 x2 . . . xn is a primitive root mod p. And we are done.

2
Problem 2.1: Sum of Powers
Let p > 2 be a prime. then for any integer x
(
−1 if p − 1 | x
1x + 2x + · · · + (p − 1)x ≡ (mod p)
0 if p − 1 ∤ x

Problem 2.2
Let x be a primitive root modulo an odd prime p. If p = 2k + 1, prove that

xk ≡ −1 (mod p)

Now we are going to finish this note, but before that, let’s see some properties
more.

Corollary 2.2. Let a be a primitive root mod p and x be any integer such that p ∤ x.
Then x ≡ ak (mod p) where 1 ≤ k ≤ p − 1.

The proof is quite easy and left for the reader.


p−1
Corollary 2.3. Let g be a primitive root mod p, then Op (g k ) = gcd(p−1,k) .

Proof. Let

(g k )x = g kx ≡ 1 (mod p) =⇒ Op (g) = p − 1 | kx
p−1 kx p−1
=⇒ | =⇒ |x
gcd(p − 1, k) d gcd(p − 1, k)
Again
p−1 p−1
(g k ) d = g (p−1)n = (g p−1 )n ≡ 1 (mod p) =⇒ x |
gcd(p − 1, k)
p−1
Combining these two results give us, x = Op (g k ) = gcd(p−1,k) as desired.

Problem 2.3
Show that there are exactly φ(p − 1) primitive roots modulo p.

Prove this using the last two corollaries.

You might also like