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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A043278 Maximal run length in base 4 representation of n. 8
1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 3, 2, 2, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 3, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 2, 2, 3, 3, 2, 2, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 4, 3, 3, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

Sequences A031942 (or A043090), A037977, A037978, A037979 list numbers for which a(n)=1, a(n)=2, a(n)=3, a(n)=4. - M. F. Hasler, Jul 23 2013

LINKS

Table of n, a(n) for n=1..90.

MAPLE

mRunLen := proc(L)

    if nops(L) = 0 then

        0;

    else

        a := 1 ;

        for i from 2 to nops(L) do

            if op(i, L) = op(i-1, L) then

                a := a+1 ;

            else

                a := max(a, procname([op(i..nops(L), L)])) ;

                break;

            end if;

        end do:

        a ;

    end if ;

end proc:

A043278 := proc(n)

    convert(n, base, 4) ;

    mRunLen(%) ;

end proc: # R. J. Mathar, Jul 26 2015

MATHEMATICA

Table[Max[Length/@Split[IntegerDigits[n, 4]]], {n, 100}] (* Harvey P. Dale, Jan 21 2014 *)

PROG

(PARI) A043278(n, b=4)={my(m, c=1); while(n>0, n%b==(n\=b)%b && c++ && next; m=max(m, c); c=1); m} \\ - M. F. Hasler, Jul 23 2013

CROSSREFS

Cf. A043276-A043290 for base-2 to base-16 analogs.

Sequence in context: A032542 A107038 A236833 * A125238 A025896 A050432

Adjacent sequences:  A043275 A043276 A043277 * A043279 A043280 A043281

KEYWORD

nonn,base

AUTHOR

Clark Kimberling

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 19 12:49 EDT 2019. Contains 325159 sequences. (Running on oeis4.)