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 A218788 #12 Nov 12 2012 17:59:54 %S A218788 0,0,0,0,1,0,0,1,3,0,0,0,1,3,0,4,0,0,1,0,0,1,3,0,4,0,0,1,4,0,0,2,0,3, %T A218788 1,0,0,0,1,3,0,4,0,0,1,4,0,0,2,0,3,1,0,4,0,0,2,0,37,0,0,110,0,3,0,1,0, %U A218788 0,1,3,0,4,0,0,1,4,0,0,2,0,3,1,0,4,0,0 %N A218788 a(n) = A014486-index for the n-th tendril of infinite beanstalk (A213730(n)), with the "lesser numbers to the right side" construction. %C A218788 "Tendrils" of the beanstalk are the finite side-trees sprouting from its infinite trunk (see A179016) at the numbers given by A213730. %H A218788 A. Karttunen, <a href="/A218788/b218788.txt">Table of n, a(n) for n = 1..8727</a> %H A218788 A. Karttunen, <a href="/A014486/a014486_1.pdf">Illustration of how binary trees (the second rightmost column) are encoded by A014486</a> %e A218788 A213730(9)=22, and from that branches 24 and 25 (as both A011371(24)=A011371(25)=22) and while 24 is a leaf (in A055938) the other branch 25 further branches to two leaves (as both A011371(28)=A011371(29)=25). %e A218788 When we construct a binary tree from this in such a fashion that the larger numbers go to the left, we obtain: %e A218788 .......... %e A218788 29...28... %e A218788 ..\./..... %e A218788 ...25..24. %e A218788 ....\./... %e A218788 .....22... %e A218788 .......... %e A218788 and the binary tree %e A218788 ....... %e A218788 .\./... %e A218788 ..*.... %e A218788 ...\./. %e A218788 ....*.. %e A218788 ....... %e A218788 is located as A014486(3) in the normal encoding order of binary trees, thus a(9)=3. %o A218788 (Scheme with Antti Karttunen's memoization macro definec): %o A218788 (define (A218788 n) (Aux_for218788 (A213730 n))) %o A218788 (definec (Aux_for218788 n) (cond ((zero? (A079559 n)) 0) ((not (zero? (A213719 n))) -1) (else (A072764bi (Aux_for218788 (A213724 n)) (Aux_for218788 (A213723 n)))))) %Y A218788 These are the mirror-images of binary trees given in A218787, i.e. a(n) = A057163(A218787(n)). A218786 gives the sizes of these trees. Cf. A072764, A218610, A218611. %K A218788 nonn %O A218788 1,9 %A A218788 _Antti Karttunen_, Nov 11 2012