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
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, 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, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,8
LINKS
MATHEMATICA
Max[Length/@Split[IntegerDigits[#, 7]]]&/@Range[100] (* Harvey P. Dale, Mar 30 2016 *)
PROG
(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
(Python)
from itertools import groupby
from sympy.ntheory.factor_ import digits
def A043281(n): return max(len(list(g)) for k, g in groupby(digits(n, 7)[1:])) # Chai Wah Wu, Mar 09 2023
CROSSREFS
Cf. A007093 (base 7).
Cf. A043276-A043290 for base-2 to base-16 analogs.
Sequence in context: A341644 A198293 A368330 * A365634 A320267 A304327
KEYWORD
nonn,base
AUTHOR
STATUS
approved

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 25 11:30 EDT 2024. Contains 371967 sequences. (Running on oeis4.)