OFFSET
1,1
COMMENTS
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..5000
MATHEMATICA
Module[{n = 1, s = -1}, NestList[If[n++; PrimeQ[#], Prime[n] + (s = -s), 2*# + s] &, 2, 100]] (* Paolo Xausa, Aug 13 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 12 2024
STATUS
approved