Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A165413
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A165413 a(n) = number of distinct lengths of runs in the binary representation of n. +0
3
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; listen)
OFFSET

1,4

COMMENT

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 this_sequence A080573 A006340 A076371

Adjacent sequences: A165410 A165411 A165412 this_sequence A165414 A165415 A165416

KEYWORD

base,nonn

AUTHOR

Leroy Quet (q1qq2qqq3qqqq(AT)yahoo.com), Sep 17 2009

EXTENSIONS

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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 16 17:18 EST 2009. Contains 170825 sequences.


AT&T Labs Research