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.
%I A054055 #52 Mar 19 2023 05:01:36 %S A054055 0,1,2,3,4,5,6,7,8,9,1,1,2,3,4,5,6,7,8,9,2,2,2,3,4,5,6,7,8,9,3,3,3,3, %T A054055 4,5,6,7,8,9,4,4,4,4,4,5,6,7,8,9,5,5,5,5,5,5,6,7,8,9,6,6,6,6,6,6,6,7, %U A054055 8,9,7,7,7,7,7,7,7,7,8,9,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,1,1,2,3,4 %N A054055 Largest digit of n. %C A054055 A095815(n) = n + a(n). - _Reinhard Zumkeller_, Aug 23 2011 %C A054055 a(A007088(n)) = 1, n > 0; a(A136399(n)) > 1. - _Reinhard Zumkeller_, Apr 25 2012 %C A054055 a(n) = 9 for almost all n. Sum_{n < x} a(n) = 9x + O(.956^x). - _Charles R Greathouse IV_, Oct 02 2013 %H A054055 Reinhard Zumkeller, <a href="/A054055/b054055.txt">Table of n, a(n) for n = 0..10000</a> %e A054055 a(12)=2 because 1 < 2. %p A054055 [seq(max(convert(n,base,10)),n=0..120)]; %t A054055 f[n_] := Sort[IntegerDigits[n]][[-1]]; Array[f, 105, 0] (* _Alonso del Arte_, May 14 2011 *) (* and revised by _Robert G. Wilson v_, Aug 24 2011 *) %t A054055 Max/@IntegerDigits[Range[0,110]] (* _Harvey P. Dale_, Apr 17 2016 *) %o A054055 (Haskell) %o A054055 a054055 = f 0 where %o A054055 f m x | x <= 9 = max m x %o A054055 | otherwise = f (max m d) x' where (x',d) = divMod x 10 %o A054055 -- _Reinhard Zumkeller_, Jun 20 2012, May 14 2011 %o A054055 (PARI) a(n)=vecmax(eval(Vec(Str(n)))) \\ _Charles R Greathouse IV_, Jun 16 2011 %o A054055 (PARI) a(n)=vecmax(digits(n)) \\ _Charles R Greathouse IV_, Oct 02 2013 %o A054055 (Magma) [n eq 0 select 0 else Maximum(Intseq(n)): n in [0..104]]; // _Bruno Berselli_, Aug 24 2011 %o A054055 (Python) %o A054055 def A054055(n): return max(int(d) for d in str(n)) # _Chai Wah Wu_, Jun 06 2022 %Y A054055 For bases 3 through 12 see A190592, A190593, A190594, A190595, A190596, A190597, A190598, A054055, A190599, A190600. %Y A054055 Cf. A054054. %K A054055 base,easy,nonn,look %O A054055 0,3 %A A054055 _Henry Bottomley_, Apr 29 2000