This site is supported by donations to The OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A213727 a(n) = 0 if n is in the infinite trunk of the "binary beanstalk", otherwise number of nodes (including leaves and the node n itself) in that finite branch of the beanstalk. 12
 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 3, 0, 1, 1, 1, 0, 0, 1, 3, 0, 1, 1, 5, 0, 1, 3, 0, 1, 1, 1, 1, 0, 0, 1, 3, 0, 1, 1, 5, 0, 1, 3, 0, 1, 1, 1, 0, 7, 1, 0, 5, 1, 1, 0, 3, 1, 3, 0, 1, 1, 1, 1, 1, 0, 0, 1, 3, 0, 1, 1, 5, 0, 1, 3, 0, 1, 1, 1, 0, 7, 1, 0, 5, 1, 1, 0, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,11 COMMENTS a(n) tells, for each natural number n, whether it belongs to the infinite trunk of the binary beanstalk (in A179016, 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 different numbers one can arrive at this n by repeatedly subtracting their bit-count (A000120) from them (as explained in A071542), and including also n itself as one of the cases. a(n) is always odd unless it is zero. In particular, each a(A213717(n)) is an odd number greater than one. LINKS Antti Karttunen, Table of n, a(n) for n = 0..16384 FORMULA If A079559(n)=0, a(n)=1; otherwise, if A213719(n)=1, a(n)=0; otherwise a(n) = 1+a(A213723(n))+a(A213724(n)). Other identities. For all n: a(A179016(n)) = 0, a(A055938(n)) = 1, and a(A213717(n)) >= 3. a(A213717(n)) = (2*A213726(A213717(n)))-1. EXAMPLE a(10) = 3 because we include 10 itself ("1010" in binary) and the two numbers n for which it is true that n - A000120(n) = 10, i.e., 12 and 13 ("1100" and "1101" in binary). Furthermore, there do not exist any such numbers for 12 or 13, as both are members of A055938 (see also the comment at A213717). Similarly, a(22) = 5 as there are the following five cases: 22 itself, 24 as 24-A000120(24) = 24-2 = 22 (note that 24 is in A055938), 25 as 25-A000120(25) = 25-3 = 22, and the two terminal nodes (leaves) branching from 25, that is, 28 & 29 (as 28-A000120(28) = 28-3 = 25, and 29-A000120(29) = 29-4=25). PROG (Scheme with memoization-macro definec) (definec (A213727 n) (cond ((zero? (A079559 n)) 1) ((not (zero? (A213719 n))) 0) (else (+ 1 (A213727 (A213723 n)) (A213727 (A213724 n)))))) CROSSREFS Cf. A179016. Cf. also A055938, A079559, A213717, A213719, A213723, A213724, A213725, A213726, A213731. Analogous sequences computed for other "beanstalk" or similar tree systems: A227643, A230427, A255327. Sequence in context: A147987 A036860 A119624 * A119612 A101949 A124796 Adjacent sequences:  A213724 A213725 A213726 * A213728 A213729 A213730 KEYWORD nonn AUTHOR Antti Karttunen, Nov 01 2012 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 26 00:35 EDT 2019. Contains 326324 sequences. (Running on oeis4.)