OFFSET
1,2
COMMENTS
Empirically, growing by a factor of 1.67. - Michael S. Branicky, Jul 24 2022
MATHEMATICA
t = NestList[DeleteDuplicates[Flatten[Map[{#, NextPrime[2 #, -1], NextPrime[2 #, 1]} &, #]]] &, {2}, 26]; g = Join[{{2}}, Map[Complement[t[[# + 1]], t[[#]]] &, Range[Length[t] - 1]]]; Map[Length, g] (* A234961 *) (* Peter J. C. Moses, Dec 30 2013 *)
PROG
(Python)
from itertools import islice
from sympy import prevprime, nextprime
def agen():
yield 1
reach, expand = {2}, [2]
while True:
newreach = set()
while len(expand) > 0:
p = expand.pop()
for q in prevprime(2*p), nextprime(2*p):
if q not in reach:
newreach.add(q)
yield len(newreach)
reach |= newreach
expand = list(newreach)
print(list(islice(agen(), 20))) # Michael S. Branicky, Jul 24 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 01 2014
EXTENSIONS
a(28)-a(38) from Michael S. Branicky, Jul 24 2022
a(39)-a(40) from Michael S. Branicky, Jul 26 2022
STATUS
approved