login
A234961
Number of primes in level n of the tree generated at A234960.
3
1, 2, 2, 4, 6, 9, 15, 22, 34, 55, 84, 140, 240, 386, 657, 1097, 1788, 2968, 4949, 8182, 13678, 22867, 38003, 63339, 105786, 175926, 293583, 490270, 818524, 1366054, 2280742, 3808502, 6362513, 10628760, 17754796, 29663658, 49577707, 82857626, 138494916, 231524984
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
Sequence in context: A293546 A366910 A052012 * A018061 A304778 A173495
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