login
A175465
a(n) is the number of elements in the largest set of same-sized run-lengths (of either 0's or 1's) in the binary representation of n.
1
1, 2, 1, 1, 3, 1, 1, 1, 2, 4, 2, 2, 2, 1, 1, 1, 2, 3, 2, 3, 5, 3, 2, 1, 2, 3, 2, 1, 2, 1, 1, 1, 2, 3, 1, 2, 4, 2, 1, 3, 4, 6, 4, 2, 4, 3, 2, 1, 1, 2, 3, 2, 4, 2, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1, 2, 3, 1, 2, 4, 2, 2, 2, 3, 5, 3, 3, 3, 2, 1, 3, 4, 5, 3, 5, 7, 5, 4, 2, 3, 5, 3, 2, 4, 3, 2, 1, 1, 2, 2, 3, 3, 3, 2, 2, 3, 5, 3, 3, 3
OFFSET
1,2
COMMENTS
It is possible that two or more run-lengths may be tied for the greatest number of runs of each length.
LINKS
EXAMPLE
1132 in binary is 10001101100. There are two runs of one digit (one run of a 0, one of a 1), three runs of two digits (one run of two 0's, two runs of two 1's), and one run of three 0's. Since the greatest number of similar-sized runs is 3 (of two digits each), then a(1132) = 3.
MATHEMATICA
Table[Max[Transpose[Tally[Length/@Split[IntegerDigits[n, 2]]]][[2]]], {n, 110}] (* Harvey P. Dale, Sep 22 2013 *)
CROSSREFS
Sequence in context: A230440 A283495 A196931 * A080209 A347171 A127949
KEYWORD
base,nonn
AUTHOR
Leroy Quet, May 24 2010
EXTENSIONS
More terms from Sean A. Irvine, Jun 08 2011
STATUS
approved