cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A043281 Maximal run length in base-7 representation of n.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A007093 (base 7).
Cf. A043276-A043290 for base-2 to base-16 analogs.

Programs

  • Mathematica
    Max[Length/@Split[IntegerDigits[#,7]]]&/@Range[100] (* Harvey P. Dale, Mar 30 2016 *)
  • 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