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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A071542 Number of steps to reach 0 starting with n and using the iterated process : x -> x - ( number of 1's in binary representation of x). 1
1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

FORMULA

It seems that a(n) ~ C n/Log(n) asymptotically with C = 1, 4... ( n = 10^6 gives C = 1.469... n = 10^7 gives C = 1.4614...)

EXAMPLE

17 (= 10001 in binary) -> 15 (= 1111) -> 11 (= 1011) -> 8 (= 1000) -> 7 (= 111) -> 4 (= 100) -> 3 (= 11) -> 1 -> 0 hence a(17)=8

PROG

(PARI) for(n=1, 150, s=n; t=0; while(s!=0, t++; s=s-sum(i=1, length(binary(s)), component(binary(s), i))); if(s==0, print1(t, ", "); ); )

CROSSREFS

Sequence in context: A194163 A194253 A176843 * A176841 A176814 A088461

Adjacent sequences:  A071539 A071540 A071541 * A071543 A071544 A071545

KEYWORD

easy,nonn

AUTHOR

Benoit Cloitre (benoit7848c(AT)orange.fr), Jun 02 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 04:47 EST 2012. Contains 205860 sequences.