OFFSET
0,3
COMMENTS
These are iterates of A233272: a(0)=0, and for n>0, a(n) = A233272(a(n-1)). The difference from A216431 stems from the fact that it uses A023416 to count the 0-bits in the binary expansion of n, while this sequence uses A080791, which results a slightly different start for the iteration, and a much better alignment with sequences related to "infinite trunk of binary beanstalk", A179016.
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..8727
A. Karttunen Ratio A233271/A179016 plotted with OEIS Plot2-script
FORMULA
MATHEMATICA
a[0] = 0; a[n_] := a[n] = If[n == 1, 1, # + 1 + Last@ DigitCount[#, 2] &@ a[n - 1]]; Table[a@ n, {n, 0, 59}] (* or *)
Insert[NestList[# + 1 + DigitCount[#, 2, 0] &, 0, nn], 1, 2] (* Michael De Vlieger, Mar 07 2016, the latter after Harvey P. Dale at A216431 *)
PROG
CROSSREFS
Differs from A216431 only in that here 1 has been inserted into position a(1), between 0 and 2.
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Dec 12 2013
STATUS
approved