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.
%I A213726 #22 Jun 03 2025 11:57:51 %S A213726 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, %T A213726 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, %U A213726 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 %N 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. %C A213726 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). %H A213726 Antti Karttunen, <a href="/A213726/b213726.txt">Table of n, a(n) for n = 0..16384</a> %F A213726 If A079559(n)=0, a(n)=1; otherwise, if A213719(n)=1, a(n)=0; otherwise a(n) = a(A213723(n))+a(A213724(n)). %e A213726 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. %o A213726 (Scheme with memoization-macro definec): (definec (A213726 n) (cond ((zero? (A079559 n)) 1) ((not (zero? (A213719 n))) 0) (else (+ (A213726 (A213723 n)) (A213726 (A213724 n)))))) %Y A213726 Differs from A213725 for the first time at n=208, where a(n)=6, while A213725(208)=5. %Y A213726 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. %K A213726 nonn,base %O A213726 0,11 %A A213726 _Antti Karttunen_, Nov 01 2012