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 one-child node is assigned as the left child.
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
Offset: 0
Keywords
Programs
-
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
Comments