OFFSET
0,3
COMMENTS
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..10000
EXAMPLE
a(104) = 0 because the digits of 104 are 1 (one), 0 (zero) and 4 (four) and "zero" occurs after both "four" and "one" alphabetically.
PROG
(Python)
def alpha(n): return [8, 5, 4, 9, 1, 7, 6, 3, 2, 0].index(n)
def a(n): return sorted(map(int, str(n)), key=alpha)[-1]
print([a(n) for n in range(105)]) # Michael S. Branicky, Dec 12 2023
CROSSREFS
KEYWORD
base,easy,nonn,word
AUTHOR
Rick L. Shepherd, Nov 11 2007
STATUS
approved