OFFSET
0,2
FORMULA
a(n) = A051652(2*n+1). - Sean A. Irvine, Oct 01 2021
MATHEMATICA
seq[max_] := Module[{s = Table[0, {max}], c = 1, n = 4}, s[[1]] = 1; While[c < max, i = (Min[n - NextPrime[n, -1], NextPrime[n] - n] + 1)/2; If[i <= max && s[[i]] == 0, c++; s[[i]] = n]; n += 2]; s] ; seq[20] (* Amiram Eldar, Aug 28 2021 *)
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
EXTENSIONS
More terms from James A. Sellers, Dec 07 1999
More terms from Amiram Eldar, Aug 28 2021
STATUS
approved