OFFSET
1,1
COMMENTS
The record strong pseudoprimes are 2047, 4097, 4711, 5627, 7251, 7851, 9409, 10261, 11359, 13747, 18299, 25761, 32761, 38323, 40501, 97921, ...
MATHEMATICA
sppQ[n_?EvenQ, _] := False; sppQ[n_?PrimeQ, _] := False; sppQ[n_, b_] := Module[{ans=False}, s = IntegerExponent[n-1, 2]; d = (n-1)/2^s; If[ PowerMod[b, d, n] == 1, ans=True, Do[If[PowerMod[b, d*2^r, n] == n-1, ans=True], {r, 0, s-1}]]; ans]; smallestSPP[b_] := Module[ {k=3}, While[ !sppQ[k, b], k+=2]; k ]; sm=0; a={}; Do[s=smallestSPP[b]; If[s>sm, sm=s; AppendTo[a, b]], {b, 2, 10^4}]; a (* after Jean-François Alcover at A020229 *)
PROG
(PARI) lista(nn) = {my(m=0); for (n=2, nn, my(r=a298756(n)); if (r>m, m =r; print1(n, ", ")); ); } \\ Michel Marcus, Jan 31 2022; using pari code in A298756
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Amiram Eldar, Jan 26 2018
EXTENSIONS
a(9)-a(16) from Jonathan Pappas, Jan 31 2022
STATUS
approved