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.

A255072 Number of steps to reach 0 starting with n and using the iterated process: x -> x - (number of runs in binary representation of x).

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 4, 4, 4, 4, 5, 5, 5, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 24, 25
Offset: 0

Views

Author

Antti Karttunen, Feb 14 2015

Keywords

Crossrefs

Cf. A255053 (least inverse), A255055 (greatest inverse), A255054 (run lengths).
Cf. A255061 & A255062 (values at points (2^n)-2 and (2^n)-1).
Analogous sequences: A071542, A219642, A219652

Formula

a(0) = 0; for n >= 1, a(n) = 1 + a(A236840(n)) = 1 + a(n - A005811(n)).
Other identities. For all n >= 0:
a(A255053(n)) = a(A255055(n)) = n.
a(A255056(n)) = n. [This sequence works also as an inverse function for number-of-runs beanstalk A255056.]