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.
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
Offset: 0
Keywords
Examples
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).
Links
- Antti Karttunen, Table of n, a(n) for n = 0..16384
Comments