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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140977 a(n) = the smallest integer > n that has the same number of (nonleading) zeros in its binary representation as n has. 2
3, 5, 7, 9, 6, 11, 15, 17, 10, 12, 13, 19, 14, 23, 31, 33, 18, 20, 21, 24, 22, 25, 27, 35, 26, 28, 29, 39, 30, 47, 63, 65, 34, 36, 37, 40, 38, 41, 43, 48, 42, 44, 45, 49, 46, 51, 55, 67, 50, 52, 53, 56, 54, 57, 59, 71, 58, 60, 61, 79, 62, 95, 127, 129, 66, 68, 69, 72, 70, 73, 75 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

COMMENTS

Permutation of the non binary powers, cf. A057716. [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Aug 15 2010]

LINKS

R. Zumkeller, Table of n, a(n) for n = 1..1000 [From Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Aug 15 2010]

EXAMPLE

4 in binary is 100, which has 2 zeros. Checking the binary representations of the integers > 4: 5 = 101 in binary, which has one 0. 6 = 110 in binary, which has one 0. 7 = 111 in binary, which has zero 0's. 8 = 1000 in binary, which has three 0's. But 9 = 1001 in binary, which has two 0's, the same number of zeros that 4 (= 100 in binary) has. So a(4) = 9.

MATHEMATICA

a = {}; For[n = 1, n < 100, n++, i = n + 1; While[ ! DigitCount[i, 2, 0] == DigitCount[n, 2, 0], i++ ]; AppendTo[a, i]]; a [From Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), Aug 25 2008]

CROSSREFS

Cf. A057168, A023416.

Sequence in context: A065271 A029657 A122641 * A161821 A139083 A139081

Adjacent sequences:  A140974 A140975 A140976 * A140978 A140979 A140980

KEYWORD

base,nonn

AUTHOR

Leroy Quet Aug 17 2008

EXTENSIONS

More terms from Stefan Steinerberger (stefan.steinerberger(AT)gmail.com), Aug 25 2008

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 19:45 EST 2012. Contains 205951 sequences.