login
Integers whose binary representation contains exactly two 1s, the 1s not being adjacent.
2

%I #8 Oct 25 2017 17:04:13

%S 5,9,10,17,18,20,33,34,36,40,65,66,68,72,80,129,130,132,136,144,160,

%T 257,258,260,264,272,288,320,513,514,516,520,528,544,576,640,1025,

%U 1026,1028,1032,1040,1056,1088,1152,1280,2049,2050,2052,2056,2064,2080,2112,2176

%N Integers whose binary representation contains exactly two 1s, the 1s not being adjacent.

%H Gil Broussard, Mar 24 2008, <a href="/A136318/b136318.txt">Table of n, a(n) for n = 1..99</a>

%e a(1) = 5 = 101b.

%e a(2) = 9 = 1001b.

%e a(3) = 10 = 1010b.

%e a(100) = 33024 = 1000000100000000b.

%t Select[Range[2500],DigitCount[#,2,1]==2&&SequenceCount[IntegerDigits[#,2],{1,1}]==0&] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Oct 25 2017 *)

%K base,nonn

%O 1,1

%A _Gil Broussard_, Mar 24 2008