OFFSET
0,11
COMMENTS
a(n) tells for each natural number n, whether it belongs to the infinite trunk of beanstalk (when a(n)=0), or if it is one of the terminal nodes (i.e., leaves, A055938) (when a(n)=1), or otherwise, when a(n)>1, tells from how many terminal nodes one can end to this n, by repeatedly subtracting their bit count (A000120) from them (as explained in A071542).
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..16384
FORMULA
EXAMPLE
a(10)=2 because the only numbers in A055938 from which one can end to 10 by the process described in A071542/A179016 are 12 and 13 (see comment at A213717). Similarly, a(22)=3 as there are following three cases: 24 as 24-A000120(24) = 24-2 = 22, and also 28 & 29 as 28-A000120(28) = 28-3 = 25, and 29-A000120(29) = 29-4 = 25, and then 25-A000120(25) = 25-3 = 22.
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 01 2012
STATUS
approved