login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A218253 The number of steps it takes, by taking the smallest number so that it minus the number of ones in its binary representation is the previous number, to reach a number which has no others that satisfy this property. 3
1, 0, 2, 1, 0, 0, 3, 2, 0, 1, 1, 0, 0, 0, 3, 2, 0, 1, 2, 0, 0, 1, 2, 0, 1, 1, 0, 0, 0, 0, 3, 2, 0, 1, 2, 0, 0, 1, 3, 0, 1, 2, 0, 0, 0, 1, 3, 0, 1, 2, 0, 0, 2, 1, 0, 1, 1, 0, 0, 0, 0, 0, 3, 2, 0, 1, 2, 0, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
A218252 is divided into groups with length the numbers with odd position in this sequence.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=7, the numbers you get are 7,8,10,12, and because this takes 3 steps, the 7th term is 3.
PROG
(PARI) f(n)=for(k=n+1, n+log(n)\log(2)+1, if(k-hammingweight(k)==n, return(k)))
a(n)=my(k); while(n=f(n), k++); k \\ Charles R Greathouse IV, Oct 29 2012
CROSSREFS
Sequence in context: A281449 A280605 A362427 * A037872 A037854 A362633
KEYWORD
nonn,easy
AUTHOR
Nico Brown, Oct 24 2012
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 00:38 EDT 2024. Contains 372341 sequences. (Running on oeis4.)