Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11754

Re: primitive root error

From daniel.lichtblau0@gmail.com
Newsgroups comp.soft-sys.math.mathematica
Subject Re: primitive root error
Date 2012-09-15 07:45 +0000
Message-ID <k31bn7$mqc$1@smc.vnet.net> (permalink)
References <k2ub15$h9h$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


On Thursday, September 13, 2012 11:16:47 PM UTC-5, Dan Dubin wrote:
> 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}

Me, I'd call that a mistake in the documentation. Anyway, you can get the smallest by resorting to a crude, nay, barbaric tactic: invoke Wolfram|Alpha to find all the primitive roots.

In[71]:= WolframAlpha["primitive roots of 18", "MathematicaResult"]

Out[71]= {5, 11}

Daniel Lichtblau
Wolfram Research


Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

primitive root error Dan Dubin <ddubin@ucsd.edu> - 2012-09-14 04:15 +0000
  Re: primitive root error daniel.lichtblau0@gmail.com - 2012-09-15 07:45 +0000
  Re: primitive root error Andrzej Kozlowski <akozlowski@gmail.com> - 2012-09-16 07:22 +0000
  Re: primitive root error danl@wolfram.com - 2012-09-18 07:46 +0000

csiph-web