A136318 Integers whose binary representation contains exactly two 1s, the 1s not being adjacent.
5, 9, 10, 17, 18, 20, 33, 34, 36, 40, 65, 66, 68, 72, 80, 129, 130, 132, 136, 144, 160, 257, 258, 260, 264, 272, 288, 320, 513, 514, 516, 520, 528, 544, 576, 640, 1025, 1026, 1028, 1032, 1040, 1056, 1088, 1152, 1280, 2049, 2050, 2052, 2056, 2064, 2080, 2112, 2176
Offset: 1
Examples
a(1) = 5 = 101_2. a(2) = 9 = 1001_2. a(3) = 10 = 1010_2. a(100) = 33024 = 1000000100000000_2.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000 (terms 1..99 from Gil Broussard)
Programs
-
Mathematica
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 *)
-
Python
from math import isqrt, comb def A136318(n): return (1<<(m:=isqrt(n<<3)+1>>1)+1)+(1<
Chai Wah Wu, Apr 07 2025
Comments