OFFSET
1,2
LINKS
N. J. A. Sloane, Table of n, a(n) for n = 1..10000
MATHEMATICA
Module[{nmax = 100, smn = 1}, Differences[Nest[Append[#, If[PrimeQ[Last[#]], 2*Last[#], While[MemberQ[#, ++smn]]; smn]]&, {1}, nmax]]] (* Paolo Xausa, Feb 12 2024 *)
CROSSREFS
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Nov 03 2020
STATUS
approved