cyclic numbers: A086018
Ed Pegg Jr.
edp at wolfram.com
Sat Aug 30 01:06:57 CEST 2003
I verify Jud's term 248881.
A method can be seen in the Mathematica documentation under
MultiplicativeOrder. That leads to the following code:
DigitCycleLength[r_Rational, b_Integer?Positive] := MultiplicativeOrder[b, \
FixedPoint[Quotient[#, GCD[#, b]] &, Denominator[r]]];
a = 0;
Do[If[Prime[n] - DigitCycleLength[1/Prime[n], 10] == 1,
a++], {n, 2, PrimePi[10^7]}]
Print[a]
For the next term, change 10^7 to 10^8
--Ed Pegg Jr.
Jud McCranie wrote:
> At 06:36 PM 8/29/2003, Jud McCranie wrote:
>
>> At 05:57 PM 8/29/2003, Eric W. Weisstein wrote:
>>
>>> Does anyone know if any further terms are known to
>>>
>>> A086018 0,1,9,60,467,3617,29500
>>
>
>
>
>> Aren't these simply the primes that have 10 as a primitive root?
>> Then I get 248881 for the next term.
>
>
> And I get 2165288 for the term after that one. I need to double-check
> my program though.
>
> Also see A006883 and A001913.
>
>
More information about the SeqFan
mailing list