login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A175597
Minimal run length in binary representation of n.
6
1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1
OFFSET
1,3
MAPLE
A175597 := proc(n) local dgs, odig, runl, thisr, i ; dgs := convert(n, base, 2) ; odig := -1 ; runl := nops(dgs)+1 ; thisr := 0 ; for i from 1 to nops(dgs) do d := op(i, dgs) ; if i = 1 then thisr := 1; else if d <> odig then if thisr < runl then runl := thisr ; end if; thisr := 1 ; else thisr := thisr+1 ; end if; end if; odig := d ; end do: if thisr < runl then runl := thisr ; end if; return runl ; end proc: seq(A175597(n), n=1..130) ; # R. J. Mathar, Jul 26 2010
CROSSREFS
Cf. A043276.
Sequence in context: A337908 A325789 A356352 * A309400 A294306 A181348
KEYWORD
nonn,base
AUTHOR
STATUS
approved