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!)
A190598 Maximal digit in base-9 expansion of n. 1

%I #23 Jul 27 2021 12:30:15

%S 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 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 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 Maximal digit in base-9 expansion of n.

%F From _Matej Veselovac_, Jul 23 2021: (Start)

%F a(n) = 1 iff n is in A033046.

%F a(n) = 8 iff n is in A338090. (End)

%t a[n_] := Max[IntegerDigits[n, 9]]; (* _Matej Veselovac_, Jul 23 2021 *)

%o (PARI) a(n) = if (n, vecmax(digits(n, 9)), 0); \\ _Michel Marcus_, Jul 19 2020

%o (Python)

%o from sympy.ntheory.digits import digits

%o def a(n): return max(digits(n, 9)[1:])

%o print([a(n) for n in range(105)]) # _Michael S. Branicky_, Jul 23 2021

%Y Cf. A007095 (base 9), A033046 (indices of 1's), A338090 (indices of 8's).

%Y Cf. A054055 (maximal digit in decimal).

%K nonn,base,easy

%O 0,3

%A _N. J. A. Sloane_, May 13 2011

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)