login
Binary expansion of n contains at least one 1-bit at even position and one 1-bit at odd position.
0

%I #9 Mar 31 2017 10:31:26

%S 3,6,7,9,11,12,13,14,15,18,19,22,23,24,25,26,27,28,29,30,31,33,35,36,

%T 37,38,39,41,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,

%U 62,63,66,67,70,71,72,73,74,75,76,77,78,79,82,83,86,87,88,89,90,91,92,93

%N Binary expansion of n contains at least one 1-bit at even position and one 1-bit at odd position.

%C Also numbers neither in A000695 nor in A062880.

%e 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.

%t 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 *)

%Y Cf. A000695, A062880.

%K easy,nonn

%O 1,1

%A _Rémy Sigrist_, Apr 12 2010