A083702
Smallest number having Fibonacci(n) as least primitive root, or 0 if no such number exists.
Original entry on oeis.org
2, 2, 3, 4, 6, 0, 457, 362, 48889, 108362, 3418682
Offset: 1
a(8) = 362 because 362 is the first number having Fibonacci(8) = 21 as least primitive root.
-
<< NumberTheory`NumberTheoryFunctions`; a = Table[ Fibonacci[i], {i, 2, 20}]; b = Table[0, {20}]; k = 1; Do[j = FromDigits[ Flatten[ Position[ a, PrimitiveRoot[n]]]]; If[ b[[j]] == 0, b[[j]] = n], {n, 2, 10^6}]; b
A259484
Smallest nonprime number having least positive primitive root n, or 0 if no such root exists.
Original entry on oeis.org
1, 0, 9, 4, 0, 6, 1681, 22, 0, 0, 97969, 118, 16900321, 914, 1062961, 542, 0, 262, 2827367929, 382
Offset: 0
a(2) = 9 because the least primitive root of the nonprime number 9 is 2 and no nonprime less than 9 meets this criterion.
- A. E. Western and J. C. P. Miller, Tables of Indices and Primitive Roots. Royal Society Mathematical Tables, Vol. 9, Cambridge Univ. Press, 1968, p. XLIV.
-
smallestPrimitiveRoot[n_ /; n <= 1] = 0; smallestPrimitiveRoot[n_] := Block[{pr = PrimitiveRoot[n], g}, If[ !NumericQ[pr], g = 0, g = 1; While[g <= pr, If[ CoprimeQ[g, n] && MultiplicativeOrder[g, n] == EulerPhi[n], Break[]]; g++]]; g]; (* This part of the code is from Jean-François Alcover as found in A046145, Feb 15 2012 *)
t = Table[-1, {1000}]; ppQ[n_] := GCD @@ Last /@ FactorInteger@ n > 1; ppQ[1] = True; k = 1; While[ k < 1001, If[ ppQ@ k, t[[k]] = 0]; k++]; k = 1; While[k < 200000001, If[ !PrimeQ[k], a = smallestPrimitiveRoot[k]; If[ t[[a]] == -1, t[[a]] = k]]; k++]; t
Showing 1-2 of 2 results.
Comments