login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A165413 a(n) = number of distinct lengths of runs in the binary representation of n. 2
1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 1, 2, 2, 2, 2, 2, 2, 3, 2, 1, 2, 2, 2, 3, 1, 3, 2, 3, 2, 2, 2, 1, 2, 2, 2, 3, 3, 2, 3, 2, 3, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 1, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 3, 2 (list; graph; refs; listen; history; internal format)
OFFSET

1,4

COMMENTS

Least k whose value is n: 1, 4, 35, 536, 16775, 1060976, ..., . [From Robert G. Wilson v (rgwv(AT)rgwv.com), Sep 30 2009]

EXAMPLE

92 in binary is 1011100. There is a run of one 1, followed by a run of one 0, then a run of three 1's, then finally a run of two 0's. The run lengths are therefore (1,1,3,2). The distinct values of these run lengths are (1,3,2). Since there are 3 distinct values, then a(92) = 3.

MATHEMATICA

f[n_] := Length@ Union@ Map[ Length, Split@ IntegerDigits[n, 2]]; Array[f, 105] [From Robert G. Wilson v (rgwv(AT)rgwv.com), Sep 30 2009]

CROSSREFS

A005811, A165414

a(n)==1 for A140690. [From Robert G. Wilson v (rgwv(AT)rgwv.com), Sep 30 2009]

Sequence in context: A023518 A022921 A080763 * A172155 A080573 A186440

Adjacent sequences:  A165410 A165411 A165412 * A165414 A165415 A165416

KEYWORD

base,nonn

AUTHOR

Leroy Quet, Sep 17 2009

EXTENSIONS

More terms from Robert G. Wilson v (rgwv(AT)rgwv.com), Sep 30 2009

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 09:35 EST 2012. Contains 205614 sequences.