OFFSET
0,4
COMMENTS
a(n) = How many more nodes there are in the finite subtrees branching "right" (to the "larger side") than in the finite subtrees branching "left" (to the "smaller side") from the node n in the infinite trunk of number-of-runs beanstalk (A255056).
The edge-relation between nodes is given by A236840(child) = parent. Odd numbers are leaves, as there are no such k that A236840(k) were odd.
If A255058(n) = 1, then a(n) = 0, but also in some other cases.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..8590
EXAMPLE
The only finite subtree starting from the node number 0 (which is 0) is the leaf 1, and it branches to the "left" (meaning that it is less than 2, which is the next node in the infinite trunk), thus the difference between the nodes in finite branches to the right vs. the nodes in finite branches to the left is -1 and a(0) = -1.
The only finite subtrees starting from the node number 1 in the infinite trunk (which is 2), are the leaves 3 and 5, of which the other one is on the "left" side and the other one on the "right" side (i.e. less than 4 and more than 4, which is the next node in the infinite trunk), thus a(1) = 1-1 = 0.
The node 11 in the infinite trunk is A255056(11) = 30. Apart from 32, which is the next node (node 12) in the infinite trunk, it has one leaf-child 31 at the "left side" (less than 32), and one leaf-child 33 (more than 32) at the "right side", and also at that side a subtree of three nodes 34 <- 38 <- 43, thus a(11) = (3+1) - 1 = 3.
CROSSREFS
KEYWORD
sign
AUTHOR
Antti Karttunen, Feb 21 2015
STATUS
approved