Full Reptend Prime

Author

Eric W. Weisstein
March 3, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PrimeNumbers/FullReptendPrime.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/FullReptendPrime.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

FullReptendQ[n_Integer]:=PrimitiveRootQ[10,n]

Table

full=Select[Prime[Range[20]],FullReptendQ]

Prime[Position[Table[FullReptendQ[Prime[n]],{n,100}],True]//Flatten]

(TraditionalForm[DecimalExpansion[#]]&/@(1/full))//ColumnForm

PrimitiveRootQ[10,17389]

(full=Select[Prime[Range[PrimePi[10^4]]],FullReptendQ])//Length//Timing

(full=Select[Prime[Range[PrimePi[10^5]]],FullReptendQ])//Length//Timing

Table[Count[full,_?(#<10^n&)],{n,6}]

Candidates

Position[Table[Mod[10^(n-1)-1,n],{n,50}],0]//Flatten

Fraction

With[{n=2000},
Count[Prime[Range[n]],_?(PrimitiveRootQ[10,#]&)]/n
]//N//Timing

Artin's constant is 0.3739558136

l=Divide@@@Transpose[{{1,9,60,467,3617,29500,248881,2155288,19016617,170169241},Table[PrimePi[10^n],{n,10}]}];

N[l,10]

<<Utilities`Plot`

IntegerListPlot[l,PlotRange->All,AxesOrigin->{.5,0},AxesLabel->TraditionalForm/@{n,f[10^n]},Prolog->{Blue,Line[{{0,#},{10,#}}&[0.373955813619202288054]]}]

Cyclic Part

FromDigits/@CyclicPart/@(1/full)