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!)
A306441 Next larger integer with same number of runs of 1's in its binary representation as n. 1
2, 3, 4, 6, 9, 7, 8, 12, 10, 11, 13, 14, 17, 15, 16, 24, 18, 19, 20, 22, 37, 23, 25, 28, 26, 27, 29, 30, 33, 31, 32, 48, 34, 35, 36, 38, 41, 39, 40, 44, 42, 43, 45, 46, 53, 47, 49, 56, 50, 51, 52, 54, 69, 55, 57, 60, 58, 59, 61, 62, 65, 63, 64, 96, 66, 67, 68 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Number of runs of 1's in binary representation is given by A069010.
Each nonnegative number either appears in this sequence or in A002450.
LINKS
FORMULA
a(A023758(n)) = A023758(n+1) for any n > 1.
a(A043682(n)) = A043682(n+1) for any n > 0.
a(A043683(n)) = A043683(n+1) for any n > 0.
a(A043684(n)) = A043684(n+1) for any n > 0.
a(A043685(n)) = A043685(n+1) for any n > 0.
a(A043686(n)) = A043686(n+1) for any n > 0.
EXAMPLE
The first terms, in decimal and in binary, are:
n a(n) bin(n) bin(a(n))
-- ---- ------ ---------
1 2 1 10
2 3 10 11
3 4 11 100
4 6 100 110
5 9 101 1001
6 7 110 111
7 8 111 1000
8 12 1000 1100
9 10 1001 1010
10 11 1010 1011
11 13 1011 1101
12 14 1100 1110
13 17 1101 10001
14 15 1110 1111
15 16 1111 10000
16 24 10000 11000
PROG
(PARI) r1(n) = my (c=0); while (n, my (v=valuation(n+(n%2), 2)); if (n%2, c++); n\=2^v); c
a(n) = my (r=r1(n)); for (k=n+1, oo, if (r==r1(k), return (k)))
CROSSREFS
Sequence in context: A141396 A159849 A098168 * A370981 A207831 A207826
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Feb 15 2019
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 April 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)