login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A043289 Maximal run length in base-15 representation of n. 8

%I #22 Sep 27 2023 10:07:12

%S 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,

%T 1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,

%U 1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1

%N Maximal run length in base-15 representation of n.

%H Antti Karttunen, <a href="/A043289/b043289.txt">Table of n, a(n) for n = 1..65537</a>

%p A043289 := proc(n) dgs := convert(n,base,15) ; a :=1 ; rl :=1 ; for i from 2 to nops(dgs) do if op(i,dgs) <> op(i-1,dgs) then a := max(a,rl) ; rl := 1; else rl := rl+1 ; end if; end do: a := max(a,rl) ; a; end proc; # _R. J. Mathar_, Jan 11 2012

%t A043289[n_]:=Max[Map[Length,Split[IntegerDigits[n,15]]]];Array[A043289,100] (* _Paolo Xausa_, Sep 27 2023 *)

%o (PARI) A043289(n,b=15){=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

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

%Y Cf. A135518 (positions of records, also the first occurrence of each n).

%K nonn,base

%O 1,16

%A _Clark Kimberling_

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)