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 gᵏ ≡ a.
What is meant by primitive root modulo?
A primitive root mod n is an integer g such that every integer relatively prime to n is congruent to a power of g mod n. That is, the integer g is a primitive root (mod n) if for every number a relatively prime to n there is an integer z such that. ... a≡(gz(modn)).
How do you find the primitive root modulo of a number?
Primitive root of a prime number n modulo n
- Euler Totient Function phi = n-1 [Assuming n is prime] 1- Find all prime factors of phi.
- Calculate all powers to be calculated further using (phi/prime-factors) one by one.
- Check for all numbered for all powers from i=2 to n-1 i.e. (i^ powers) modulo n.