A268397 a(n) is the smallest prime with at least n consecutive primitive roots.
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
Examples
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.
Programs
-
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 *)
Extensions
More terms from Harvey P. Dale, Aug 23 2019