A134778 Last digit of n alphabetically.
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
Offset: 0
Examples
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.
Links
- Michael S. Branicky, Table of n, a(n) for n = 0..10000
Programs
-
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
Comments