login
A255331
a(n) = A255329(n) - A255328(n).
8
-1, 0, 0, -4, 1, 0, -7, 0, -3, 1, 0, 3, 0, -6, 0, -6, 0, -3, 1, 0, 3, 0, -12, 0, 0, -5, 0, 4, 0, -6, 0, -6, 0, -3, 1, 0, 3, 0, -12, 0, 0, 7, 1, -12, 2, 0, 0, -5, 0, 4, 0, -12, 0, 0, -5, 0, 4, 0, -6, 0, -6, 0, -3, 1, 0, 3, 0, -12, 0, 0, 7, 1, -12, 2, 0, 0, 7, 1, -10, 15, 0, 0, 1, -11, 2, 0, 0, -5, 0, 4, 0, -12, 0, 0, 7, 1, -12, 2, 0, 0
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
FORMULA
a(n) = A255329(n) - A255328(n).
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.
PROG
(Scheme) (define (A255331 n) (- (A255329 n) (A255328 n)))
CROSSREFS
Partial sums: A255332.
Sequence in context: A292404 A060196 A204169 * A296794 A119305 A198215
KEYWORD
sign
AUTHOR
Antti Karttunen, Feb 21 2015
STATUS
approved