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.

A233271 a(0)=0; thereafter a(n+1) = a(n) + 1 + number of 0's in binary representation of a(n), counted with A080791.

Original entry on oeis.org

0, 1, 2, 4, 7, 8, 12, 15, 16, 21, 24, 28, 31, 32, 38, 42, 46, 49, 53, 56, 60, 63, 64, 71, 75, 79, 82, 87, 90, 94, 97, 102, 106, 110, 113, 117, 120, 124, 127, 128, 136, 143, 147, 152, 158, 162, 168, 174, 178, 183, 186, 190, 193, 199, 203, 207, 210, 215, 218, 222
Offset: 0

Views

Author

Antti Karttunen, Dec 12 2013

Keywords

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.
Apart from term a(2)=2, it seems that each term a(n) >= A179016(n). Please see their ratio plotted with Plot2, and also their differences: A233270.

Crossrefs

Differs from A216431 only in that here 1 has been inserted into position a(1), between 0 and 2.

Programs

  • 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 *)

Formula

a(0)=0, and for n>0, a(n) = A233272(a(n-1)).
a(0)=0, and for n>0, a(n) = a(n-1) + 1 + A080791(a(n-1)).
a(n) = A054429(A218616(n)) = A054429(A179016(A218602(n))) [This sequence can be mapped to the infinite trunk of "binary beanstalk" with involutions A054429 & A218602].
For all n, a(A213710(n)) = 2^n = A000079(n).
For n>=3, a(A218600(n)) = A000225(n).