MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

primitive root error


The number theoretic function PrimitiveRoot[n]  is supposed to give the 
smallest generator for the multiplicative group of integers module n 
relatively prime to n.  However, Mathematica 8  says that
PrimitiveRoot[18] equals 11. This is incorrect. While this is a 
generator, it is not the smallest generator of the group. The correct 
answer is 5:

In[1]:= Table[Mod[5^n, 18], {n, 0, 6}]

Out[1]= {1, 5, 7, 17, 13, 11, 1}



  • Prev by Date: Re: A new FrontEnd
  • Next by Date: Re: Begginer's question: Saving a function for later use
  • Previous by thread: Re: Substitute variable name for value (reverse of simplification)
  • Next by thread: Re: primitive root error