login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 10
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

LINKS

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

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

PROG

(Scheme, with memoization-macro definec)

(definec (A255072 n) (if (zero? n) 0 (+ 1 (A255072 (A236840 n)))))

CROSSREFS

Cf. A255053 (least inverse), A255055 (greatest inverse), A255054 (run lengths).

Cf. A005811, A236840, A255071, A255056.

Cf. A255061 & A255062 (values at points (2^n)-2 and (2^n)-1).

Analogous sequences: A071542, A219642, A219652

Sequence in context: A173022 A060973 A097915 * A029131 A162351 A087816

Adjacent sequences:  A255069 A255070 A255071 * A255073 A255074 A255075

KEYWORD

nonn

AUTHOR

Antti Karttunen, Feb 14 2015

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 June 24 09:37 EDT 2019. Contains 324323 sequences. (Running on oeis4.)