This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
 BUILT-IN MATHEMATICA SYMBOL Tutorials »| See Also »| More About »

PrimitiveRoot

 PrimitiveRoot[n] gives the smallest primitive root of n.
• PrimitiveRoot[n] gives the smallest generator for the multiplicative group of integers modulo n relatively prime to n.
• PrimitiveRoot[n] returns unevaluated if n is not 2, 4, an odd prime power or twice an odd prime power.
A primitive root of 9 is 2:
The primitive root generates all integers modulo 9 that are relatively prime to 9:
A primitive root of 9 is 2:
 Out[1]=
The primitive root generates all integers modulo 9 that are relatively prime to 9:
 Out[2]=
 Scope   (1)
PrimitiveRoot automatically threads over lists:
The multiplicative order of a primitive root modulo n is EulerPhi[n]:
For a prime p, there exist EulerPhi primitive roots modulo p:
PrimitiveRoot is not defined for all integers:
Elements relatively prime to are enumerated by the primitive root:
New in 6