from wikipedia:
In modular arithmetic, a number g is a primitive root modulo n if every number a coprime to n is congruent to a power of g modulo n. That is, g is a primitive root modulo n, if for every integer a coprime to n, there is some integer k for which gk ≡ a (mod n). Such a value k is called the index or discrete logarithm of a to the base g modulo n. Note that g is a primitive root modulo n if and only if g is a generator of the multiplicative group of integers modulo n.
The concept of promitive root is widely used in many algorithms to solve problems in number theory, including the famous Baby-Step Giant-Step algorithm.
Catalog
Prerequisite Knowledge
orders of elements
f o r g ∈ Z , m ∈ N ∗ , i f gcd ( g , m ) = 1 , w e d e f i n e n , the smallest positive interger that satisfies g n ≡ 1 ( m o d m ) to be the order of g modulo m 。 for\space g\in \mathbb{Z},m\in\mathbb{N}^{*},if \gcd(g,m)=1,we\space define\space n,\\ \text{ the smallest positive interger that satisfies }g^n\equiv 1\pmod m\\ \text{to be the order of g modulo m} 。 for g∈Z,m∈N∗,ifgcd(g,m)=1,we define n, the smallest positive interger that satisfies gn≡1(modm)to be the order of g modulo m。
that is
o r d ( g ) = ϵ m ( g ) = m i n { n ∈ N : g n ≡ 1 ( m o d m ) } ord(g) =\epsilon_m(g) = min\lbrace n ∈ N : g ^n ≡ 1 (mod\ m)\rbrace ord(g)=ϵm(g)=min{
n∈N:gn≡1(mod m)}
Theorem 1.1
g , g 2 , ⋯ , g ϵ m ( g ) g,g^2,\cdots,g^{\epsilon_m(g)} g,g2,⋯,gϵm(g) gives different remainder modulo m m m.
Proof by contradiction:
Suppose we have i , j ∈ [ 1 , ϵ m ( g ) ] , i ≠ j i,j\in [1,\epsilon_m(g)],i\neq j i,j∈[1,ϵm(g)],i=j and g i ≡ g j ( m o d m ) g^i≡g^j(mod\ m) gi≡gj(mod m), we would have