A176237 Binary expansion of n contains at least one 1-bit at even position and one 1-bit at odd position.
3, 6, 7, 9, 11, 12, 13, 14, 15, 18, 19, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 66, 67, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 82, 83, 86, 87, 88, 89, 90, 91, 92, 93
Offset: 1
Examples
The binary expansion of 6 is "110", and has one 1-bit at (odd) position 1 and one 1-bit at (even) position 2; thus 6 appears in the sequence.
Programs
-
Mathematica
ok[n_] := With[{p = Position[IntegerDigits[n, 2], 1]}, AnyTrue[p, OddQ[#[[1]]]&] && AnyTrue[p, EvenQ[#[[1]]]&]]; Select[Range[100], ok] (* Jean-François Alcover, Mar 31 2017 *)
Comments