OFFSET
1,2
COMMENTS
The difference between the lengths of consecutive runs in binary n may be either positive, 0, or negative.
This sequence provides a way to order all of the finite sequences each of positive integers arranged in an arithmetic progression (with common difference between consecutive integers being either positive, zero, or negative). See A175327.
LINKS
Lars Blomberg, Table of n, a(n) for n = 1..10000
Lars Blomberg, C# program for generating the b-file
EXAMPLE
57 in binary is 111001. The run lengths are therefore 3,2,1, and (3,2,1) forms an arithmetic progression; so 57 is in this sequence.
MATHEMATICA
Select[Range@504, 2 > Length@Union@Differences[Length /@ Split@IntegerDigits[#, 2]] &] (* Giovanni Resta, Feb 15 2013 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Apr 07 2010
EXTENSIONS
a(30)-a(58) from Lars Blomberg, Feb 15 2013
STATUS
approved