This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A338260 #7 Oct 21 2020 22:52:31 %S A338260 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, %T A338260 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, %U A338260 11,12,11,12,13,14,13,14,14,13,12,11,13,13,14 %N 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. %C A338260 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. %C A338260 1 %C A338260 2 %C A338260 3 %C A338260 4 %C A338260 5 %C A338260 6 %C A338260 7 %C A338260 8 \_(9) %C A338260 10 %C A338260 11 \_12 %C A338260 13 14 %C A338260 15 16 %C A338260 (17) 18 %C A338260 19 %C A338260 20 \_21 %C A338260 22 23 %C A338260 24 25 %C A338260 (26) 27 \______28 %C A338260 29 30 %C A338260 31 \_32 (33) %C A338260 34 35 \______36 %C A338260 37 38 39 %C A338260 (40) 41 42 %C A338260 43 44 \_45 %C A338260 46 47 48 %C A338260 (49) 50 51 \______52 %C A338260 53 (54)\_55 56 \______57 %C A338260 58 59 60 61 %C A338260 (62) 63 64 \_65 (66) %C A338260 All right children are composite numbers and all prime numbers are left children. %C A338260 a(n) in this sequence is the number of terms with value of n in A337979. %o A338260 (Python) %o A338260 from sympy import primepi %o A338260 def depth(k): %o A338260 d = 0 %o A338260 while k > 1: %o A338260 k += primepi(k) %o A338260 k -= primepi(k) %o A338260 d += 1 %o A338260 return d %o A338260 m = 1 %o A338260 for n in range (0, 101): %o A338260 a = 0 %o A338260 while depth(m + a) == n: %o A338260 a += 1 %o A338260 print(a) %o A338260 m += a %Y A338260 Cf. A000027, A062298, A095117, A337978, A337979. %K A338260 nonn %O A338260 0,8 %A A338260 _Ya-Ping Lu_, Oct 19 2020