cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A213726 a(n)=0 if n is in the infinite trunk of the "beanstalk" (i.e., in A179016), otherwise number of terminal nodes (leaves) in that finite branch of the beanstalk.

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 0, 1, 1, 1, 0, 0, 1, 2, 0, 1, 1, 3, 0, 1, 2, 0, 1, 1, 1, 1, 0, 0, 1, 2, 0, 1, 1, 3, 0, 1, 2, 0, 1, 1, 1, 0, 4, 1, 0, 3, 1, 1, 0, 2, 1, 2, 0, 1, 1, 1, 1, 1, 0, 0, 1, 2, 0, 1, 1, 3, 0, 1, 2, 0, 1, 1, 1, 0, 4, 1, 0, 3, 1, 1, 0, 2, 1, 2, 0, 1, 1, 1, 1, 0, 4, 1, 0, 3, 1, 1, 0, 2, 1, 0, 3, 1, 1, 1, 0, 2, 1, 0, 3, 1, 1, 0, 2, 1, 2, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 2, 0, 1, 1, 3, 0, 1, 2, 0, 1, 1, 1, 0, 4, 1, 0, 3, 1, 1, 0, 2, 1, 2, 0, 1, 1, 1, 1, 0, 4, 1, 0, 3, 1, 1, 0, 2, 1, 0, 3, 1, 1, 1, 0, 2, 1, 0, 3, 1, 1, 0, 2, 1, 2, 0, 1, 1, 1, 1, 1, 0, 4, 1, 0, 3, 1, 1, 0, 2, 1, 0, 3, 1, 1, 1, 0, 2, 1, 6
Offset: 0

Views

Author

Antti Karttunen, Nov 01 2012

Keywords

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).

Examples

			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.
		

Crossrefs

Differs from A213725 for the first time at n=208, where a(n)=6, while A213725(208)=5.
For all n, a(A179016(n)) = 0, a(A055938(n)) = 1, and a(A213717(n)) >= 2. For all n, A213727(A213717(n)) = (2*a(A213717(n)))-1. Cf. A213725-A213731. Records: A218548, A218549.

Formula

If A079559(n)=0, a(n)=1; otherwise, if A213719(n)=1, a(n)=0; otherwise a(n) = a(A213723(n))+a(A213724(n)).