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!)
A043281 Maximal run length in base-7 representation of n. 5

%I #24 Sep 22 2023 01:06:49

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

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

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

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

%H Winston de Greef, <a href="/A043281/b043281.txt">Table of n, a(n) for n = 1..10000</a>

%t Max[Length/@Split[IntegerDigits[#,7]]]&/@Range[100] (* _Harvey P. Dale_, Mar 30 2016 *)

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

%o (Python)

%o from itertools import groupby

%o from sympy.ntheory.factor_ import digits

%o def A043281(n): return max(len(list(g)) for k, g in groupby(digits(n,7)[1:])) # _Chai Wah Wu_, Mar 09 2023

%Y Cf. A007093 (base 7).

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

%K nonn,base

%O 1,8

%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 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)