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!)
A179857 Smallest number greater than n having in binary representation exactly twice the number of ones as n has in binary representation. 4
3, 3, 15, 5, 15, 15, 63, 9, 15, 15, 63, 15, 63, 63, 255, 17, 23, 23, 63, 23, 63, 63, 255, 27, 63, 63, 255, 63, 255, 255, 1023, 33, 39, 39, 63, 39, 63, 63, 255, 43, 63, 63, 255, 63, 255, 255, 1023, 51, 63, 63, 255, 63, 255, 255, 1023, 63, 255, 255, 1023, 255, 1023, 1023 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) = Min{m: m > n and A000120(m) = 2*A000120(n)};
a(n) is odd;
n < a(n) < A000290(A062383(n));
a(A000079(n)) = A000051(n);
A024036 and A000225 give record values and where they occur.
LINKS
MATHEMATICA
br2[n_]:=Module[{k=If[EvenQ[n], n+1, n+2], t=2*DigitCount[n, 2, 1]}, While[ DigitCount[ k, 2, 1]!=t, k=k+2]; k]; Array[br2, 70] (* Harvey P. Dale, Sep 20 2016 *)
PROG
(PARI) a(n) = my(k=n+1, h=hammingweight(n)); while (hammingweight(k) != 2*h, k++); k; \\ Michel Marcus, Nov 13 2023
CROSSREFS
Sequence in context: A287188 A100347 A165405 * A260078 A163590 A344850
KEYWORD
base,nonn
AUTHOR
Reinhard Zumkeller, Jul 31 2010
EXTENSIONS
Definition clarified by Harvey P. Dale, Sep 20 2016
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 12:44 EDT 2024. Contains 371913 sequences. (Running on oeis4.)