up
previous
next
PrimitiveRoot
-- find a primitive root modulo a prime
Syntax
PrimitiveRoot(P: INT): INT
Description
Find a primitive root modulo the prime
P
, i.e. a generator of the cyclic multiplicative group of non-zero integers mod
P
.
Currently, the function produces the least positive primitive root.
Example
/**/ PrimitiveRoot(17551561); 97 /**/ PrimitiveRoot(4111); 12;
See Also
IsPrime