The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A153115 Positive integers with the same number of 1s in base 10 and base 2. 2

%I #16 Jun 17 2020 10:23:14

%S 1,16,128,512,1024,1152,2112,4112,8192,16384,16416,16512,131073,

%T 131074,131076,131080,131081,131088,131105,131106,131108,131110,

%U 131111,131113,131114,131116,131120,131121,131137,131138,131140,131141,131144,131152

%N Positive integers with the same number of 1s in base 10 and base 2.

%C Some have exactly one 1. These are exclusively of the form 2^n, but not universally. 512 = 1000000000b, 1 one. 2048 = 100000000000b but 2048 lacks a 1 digit. The smallest integer with 6 ones in both decimal and binary bases is 11011112 = 101010000000010000101000b.

%C If n is in the sequence and n == 0, 5, 9, 10, 13 or 17 (mod 20) or 11 (mod 40), then n+1 is in the sequence. - _Robert Israel_, Jun 17 2020

%H Giovanni Resta, <a href="/A153115/b153115.txt">Table of n, a(n) for n = 1..10000</a> (first 250 terms from Robert Israel)

%e a(6)=1152 because 1152 base 2 = 10010000000 and both terms have the same number of ones.

%p filter:= proc(n) numboccur(1,convert(n,base,2))=numboccur(1,convert(n,base,10)) end proc:

%p select(filter, [$1..2*10^5]); # _Robert Israel_, Jun 16 2020

%Y Cf. A000120.

%K base,nonn,look

%O 1,2

%A _Gil Broussard_, Dec 18 2008

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 29 03:48 EDT 2024. Contains 372921 sequences. (Running on oeis4.)