

A338260


a(n) is the number of nodes with depth of n in a binary tree defined as: root = 1 and a child (C) of a node (N) is such that A337978(C) = N. For nodes with two children, the smaller child is assigned as the left child and the bigger one as the right child. A child of a onechild node is assigned as the left child.


1



1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 6, 5, 5, 4, 4, 4, 6, 6, 7, 6, 7, 7, 8, 7, 7, 6, 8, 7, 8, 8, 10, 10, 9, 8, 11, 8, 9, 9, 10, 10, 10, 11, 12, 11, 12, 13, 14, 13, 14, 14, 13, 12, 11, 13, 13, 14
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,8


COMMENTS

The binary tree, read from left to right in the order of increasing depth n, is the positive integer sequence A000027. The first 66 numbers are shown in the figure below.
1
2
3
4
5
6
7
8 \_(9)
10
11 \_12
13 14
15 16
(17) 18
19
20 \_21
22 23
24 25
(26) 27 \______28
29 30
31 \_32 (33)
34 35 \______36
37 38 39
(40) 41 42
43 44 \_45
46 47 48
(49) 50 51 \______52
53 (54)\_55 56 \______57
58 59 60 61
(62) 63 64 \_65 (66)
All right children are composite numbers and all prime numbers are left children.
a(n) in this sequence is the number of terms with value of n in A337979.


LINKS



PROG

(Python)
from sympy import primepi
def depth(k):
d = 0
while k > 1:
k += primepi(k)
k = primepi(k)
d += 1
return d
m = 1
for n in range (0, 101):
a = 0
while depth(m + a) == n:
a += 1
print(a)
m += a


CROSSREFS



KEYWORD

nonn


AUTHOR



STATUS

approved



