login
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