login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A233271 a(0)=0; thereafter a(n+1) = a(n) + 1 + number of 0's in binary representation of a(n), counted with A080791. 29
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 (list; graph; refs; listen; history; text; internal format)
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.

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.

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..8727

A. Karttunen Ratio A233271/A179016 plotted with OEIS Plot2-script

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

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

(Scheme, with memoizing definec-macro from Antti Karttunen's IntSeq-library)

(definec (A233271 n) (if (zero? n) n (A233272 (A233271 (- n 1)))))

;; Alternative version:

(define (A233271 n) (A054429 (A218616 n)))

CROSSREFS

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

Cf. A080791, A010062, A233272, A179016, A233270, A218616, A054429, A213710, A218600.

Sequence in context: A087686 A232054 A216431 * A088413 A090669 A231428

Adjacent sequences:  A233268 A233269 A233270 * A233272 A233273 A233274

KEYWORD

nonn,base

AUTHOR

Antti Karttunen, Dec 12 2013

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 19 13:25 EST 2020. Contains 332044 sequences. (Running on oeis4.)