NumberTheory
PrimitiveRoot
primitive root modulo n
Calling Sequence
Parameters
Description
Examples
Compatibility
PrimitiveRoot(n, options)
n
-
positive integer
options
(optional) at most one of greaterthan = m or ith = i, where m is a non-negative integer and i is a positive integer
The PrimitiveRoot(n) command returns the smallest primitive root modulo n, if it exists.
The PrimitiveRoot(n, greaterthan = m) command returns the smallest primitive root modulo n greater than m.
The PrimitiveRoot(n, ith = i) command returns the ith smallest primitive root modulo n.
If the required primitive root does not exist, then an error message is displayed.
The integers that are coprime to n form a group of order Totient(n) under multiplication modulo n. If this group is cyclic, then a generator is called a primitive root modulo n. That is, if p is a primitive root modulo n, then every integer coprime to n is congruent to some power of p modulo n.
If a primitive root modulo n exists, then the number of primitive roots is Totient(Totient(n)).
So is the only primitive root modulo .
So there are two primitive roots modulo .
Both and are generators for the group of units under multiplication modulo .
Since the maximal order modulo is less than , a primitive root does not exist and an error message is displayed.
Error, (in NumberTheory:-PrimitiveRoot) there does not exist a primitive root modulo 8
List all the primitive roots modulo , if any exist.
The NumberTheory[PrimitiveRoot] command was introduced in Maple 2016.
For more information on Maple 2016 changes, see Updates in Maple 2016.
See Also
NumberTheory[MultiplicativeOrder]
NumberTheory[PseudoPrimitiveRoot]
Download Help Document