A160531 Those positive integers n that contain both odd-lengthed and even-lengthed runs of 0's and 1's when n is represented in binary.
4, 6, 9, 11, 13, 16, 18, 19, 20, 22, 24, 25, 26, 27, 28, 30, 33, 35, 36, 37, 38, 39, 41, 43, 44, 45, 47, 49, 50, 52, 53, 54, 55, 57, 59, 61, 64, 66, 67, 68, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 86, 88, 89, 90, 91, 92, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104
Offset: 1
Programs
-
Mathematica
Select[Range[120],Select[l=Length/@Split[IntegerDigits[ #,2]],EvenQ]!={}&&Select[l,OddQ]!={}&] (* Ray Chandler, May 19 2009 *)
Extensions
Extended by Ray Chandler, May 19 2009
Comments