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.

This page as a plain text file.
%I A190598 #23 Jul 27 2021 12:30:15
%S A190598 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,
%T A190598 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,
%U A190598 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
%N A190598 Maximal digit in base-9 expansion of n.
%F A190598 From _Matej Veselovac_, Jul 23 2021: (Start)
%F A190598 a(n) = 1 iff n is in A033046.
%F A190598 a(n) = 8 iff n is in A338090. (End)
%t A190598 a[n_] := Max[IntegerDigits[n, 9]]; (* _Matej Veselovac_, Jul 23 2021 *)
%o A190598 (PARI) a(n) = if (n, vecmax(digits(n, 9)), 0); \\ _Michel Marcus_, Jul 19 2020
%o A190598 (Python)
%o A190598 from sympy.ntheory.digits import digits
%o A190598 def a(n): return max(digits(n, 9)[1:])
%o A190598 print([a(n) for n in range(105)]) # _Michael S. Branicky_, Jul 23 2021
%Y A190598 Cf. A007095 (base 9), A033046 (indices of 1's), A338090 (indices of 8's).
%Y A190598 Cf. A054055 (maximal digit in decimal).
%K A190598 nonn,base,easy
%O A190598 0,3
%A A190598 _N. J. A. Sloane_, May 13 2011