In modular arithmetic, an integerg is a primitive root modulo n if every integer coprime to n is congruent to a power of g modulo n.
Note:
To see all the outputs, we can use the option "Values for all m".
Observations:
When n is a prime number, for few values of aall the outputs am mod n are only a few numbers are selected and for some values all the outputs are unique values.
For example, when n = 13 for the values of a = 2, 6, 7, and 11 we can see the values of a the outputs am mod n are all the output, i.e., {1, 2, 3, 4, ... , 12 (n-1)} . These values are called the primitive roots of n.
When n is a composite number, we can see by changing the values of a the outputs am (mod n) are only a few numbers are selected. We observe that for all the values of a by using the slider.
For example, when n = 12 and a = 3, we can see only 3 and 9 are selected.