A190600 Maximal digit in base-12 expansion of n.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 2, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3, 3, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 5, 5, 5, 5, 5, 5, 6, 7, 8, 9, 10, 11, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 11, 7, 7, 7, 7, 7, 7, 7, 7, 8, 9, 10, 11, 8, 8, 8, 8, 8
Offset: 0
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
- Eric Weisstein's World of Mathematics, Duodecimal
- Wikipedia, Duodecimal
Crossrefs
Cf. A054055.
Programs
-
Haskell
import Numeric (showIntAtBase) import Data.Char (intToDigit, digitToInt) a190600 = digitToInt . maximum . flip (showIntAtBase 12 intToDigit) "" -- Reinhard Zumkeller, May 14 2011
-
Mathematica
Max[#]&/@IntegerDigits[Range[0,100],12] (* Harvey P. Dale, Apr 01 2020 *)
-
PARI
a(n) = if (n, vecmax(digits(n, 12)), 0); \\ Michel Marcus, Jul 19 2020