|
|
A134778
|
|
Last digit of n alphabetically.
|
|
2
|
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 1, 1, 6, 7, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 3, 2, 3, 3, 3, 3, 3, 3, 3, 0, 1, 2, 3, 4, 4, 6, 7, 4, 9, 0, 1, 2, 3, 4, 5, 6, 7, 5, 9, 0, 6, 2, 3, 6, 6, 6, 6, 6, 6, 0, 7, 2, 3, 7, 7, 6, 7, 7, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 9, 9, 6, 7, 9, 9, 0, 0, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
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]
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn,word
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|