

A160532


Those positive integers n that contain runs of 0's and 1's that are each a power of 2 in length when n is represented in binary.


0



1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 15, 16, 18, 19, 20, 21, 22, 25, 26, 27, 30, 33, 36, 37, 38, 41, 42, 43, 44, 45, 47, 48, 50, 51, 52, 53, 54, 60, 61, 66, 67, 73, 74, 75, 76, 77, 79, 80, 82, 83, 84, 85, 86, 89, 90, 91, 94, 97, 100, 101, 102, 105, 106, 107, 108, 109, 111, 121
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Let the binary representation of n be thought of as a string of 0's and 1's. By a "run" of 0's or 1's, it is meant either a contiguous substring all of 0's bounded by 1's or the by the edge of the string, or a contiguous substring all of 1's bounded by 0's or the by the edge of the string.


LINKS

Table of n, a(n) for n=1..69.


MATHEMATICA

Select[Range[150], And@@IntegerQ/@(Log[2, # ]&/@Length/@Split[IntegerDigits[ #, 2]])&] (* Ray Chandler, May 19 2009 *)


CROSSREFS

Sequence in context: A037475 A031487 A047422 * A047305 A032878 A032845
Adjacent sequences: A160529 A160530 A160531 * A160533 A160534 A160535


KEYWORD

base,nonn


AUTHOR

Leroy Quet, May 17 2009


EXTENSIONS

Extended by Ray Chandler, May 19 2009


STATUS

approved



