MathGroup Archive 2012

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

Search the Archive

Re: primitive root error

  • To: mathgroup at smc.vnet.net
  • Subject: [mg128099] Re: primitive root error
  • From: Andrzej Kozlowski <akozlowski at gmail.com>
  • Date: Sat, 15 Sep 2012 03:39:39 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20120914042435.8DEC1684C@smc.vnet.net>

I think it is just bad documentation. It seems that PrimitiveRoot[n] gives the smallest primitive root when n is a power of an odd prime. However, when g=PrimitiveRoot[p^k] is odd (where p is an odd prime) PrimitiveRoot[2 p^k] returns g+2^k, which is usually not the smallest primitive root. For example:

PrimitiveRoot[41^2]

 6

which is even. So now:

PrimitiveRoot[2*41^2]

1687

which is 6+41^2.

But the smallest PrimitiveRoot is:

First[
 Select[Range[2*41^2],
  MultiplicativeOrder[#, 2*41^2] == EulerPhi[2*41^2] &]]

7

which is a lot smaller.


Andrzej Kozlowski


On 14 Sep 2012, at 06:24, Dan Dubin <ddubin at ucsd.edu> 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}
>




  • Prev by Date: Speed of VectorPlot3D Object and Mouse Rotation
  • Next by Date: Re: Landau letter, Re: Mathematica as a New Approach...
  • Previous by thread: Re: primitive root error
  • Next by thread: Re: primitive root error