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.

A190598 Maximal digit in base-9 expansion of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 2, 3, 4, 5, 6, 7, 8, 2, 2, 2, 3, 4, 5, 6, 7, 8, 3, 3, 3, 3, 4, 5, 6, 7, 8, 4, 4, 4, 4, 4, 5, 6, 7, 8, 5, 5, 5, 5, 5, 5, 6, 7, 8, 6, 6, 6, 6, 6, 6, 6, 7, 8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 1, 1, 2, 3, 4, 5, 6, 7, 8, 1, 1, 2, 3, 4, 5, 6, 7, 8, 2, 2, 2, 3, 4, 5
Offset: 0

Views

Author

N. J. A. Sloane, May 13 2011

Keywords

Crossrefs

Cf. A007095 (base 9), A033046 (indices of 1's), A338090 (indices of 8's).
Cf. A054055 (maximal digit in decimal).

Programs

  • Mathematica
    a[n_] := Max[IntegerDigits[n, 9]]; (* Matej Veselovac, Jul 23 2021 *)
  • PARI
    a(n) = if (n, vecmax(digits(n, 9)), 0); \\ Michel Marcus, Jul 19 2020
    
  • Python
    from sympy.ntheory.digits import digits
    def a(n): return max(digits(n, 9)[1:])
    print([a(n) for n in range(105)]) # Michael S. Branicky, Jul 23 2021

Formula

From Matej Veselovac, Jul 23 2021: (Start)
a(n) = 1 iff n is in A033046.
a(n) = 8 iff n is in A338090. (End)