login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A268397
a(n) is the smallest prime with at least n consecutive primitive roots.
1
2, 5, 11, 37, 53, 83, 83, 269, 269, 467, 467, 1187, 1559, 1559, 1559, 6803, 6803, 6803, 10559, 10559, 10559, 35279, 38639, 38639, 38639, 38639, 38639
OFFSET
1,1
EXAMPLE
a(4)=37. 37 has the primitive roots 2, 5, 13, 15, 17, 18, 19, 20, 22, 24, 32, and 35 of which 17, 18, 19, and 20 are consecutive.
MATHEMATICA
PrimRoot[n_] :=Flatten[Position[Table[MultiplicativeOrder[i, n], {i, n - 1}], n - 1]]; t = {}; For[targ = 1, targ <= 22, targ++, flag = 0; For[n = 1, n < 1500, n++, prs = PrimRoot[Prime[n]]; numprs = EulerPhi[Prime[n] - 1]; If[targ > numprs, , For[m = 1, m <= numprs + 1 - targ, m++, temp = Take[prs, {m, m + targ - 1}]; If[temp[[1]] + targ - 1 == temp[[targ]] && flag == 0, t = Append[t, Prime[n]]; flag = 1]; If[flag == 1, Break[]]; ]; If[flag == 1, Break[]]; ]; If[flag == 1, Break[]]; ]]; t
Join[{2}, Module[{prl=Table[{p, Max[Length/@Select[Split[ Differences[ PrimitiveRootList[ p]]], #[[1]]==1&]]}, {p, Prime[Range[1500]]}]}, Table[ SelectFirst[ prl, #[[2]]>=k&], {k, 20}]][[All, 1]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 23 2019 *)
CROSSREFS
Cf. A060749, A261438 (has "exactly" instead of "at least").
Sequence in context: A130622 A112600 A156014 * A261438 A092298 A074497
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
More terms from Harvey P. Dale, Aug 23 2019
STATUS
approved