PrimitiveRoot[n] gives the smallest primitive root of n.
A primitive root of 9 is 2:
The primitive root generates all integers modulo 9 that are relatively prime to 9:
MultiplicativeOrder EulerPhi CarmichaelLambda PowerMod DirichletCharacter
400+ new features, including the new Wolfram Predictive Interface, social network analysis, enterprise CDF deployment, and more »