OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ n. - Charles R Greathouse IV, Mar 29 2013
EXAMPLE
25 written in binary is 11001. The runs are (11)(00)(1). Since at least one run of 1's (the leftmost run here) is the same length as at least one run of 0's (the only run of 0's here), 25 is included in this sequence.
PROG
(PARI) is(n)=my(ones=List(), zeros=List()); if(n%2, listput(ones, valuation(n+1, 2)); n>>=ones[1]); while(n, listput(zeros, valuation(n, 2)); n>>=zeros[#zeros]; listput(ones, valuation(n+1, 2)); n>>=ones[#ones]); #setintersect(vecsort(Vec(ones), , 8), vecsort(Vec(zeros), , 8))>0 \\ Charles R Greathouse IV, Mar 29 2013
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Leroy Quet, Jul 11 2008
EXTENSIONS
a(16) to a(27) from Ray G. Opao, Jan 08 2009
a(28)-a(64) from Lars Blomberg, Dec 09 2011
STATUS
approved