A115299 Greatest digit of n + least digit of n. Different from A088133.
2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 8, 9, 10, 11, 12, 13, 14
Offset: 1
Examples
a(1) = 1 + 1 = 2, a(232) = 3 + 2 = 5, a(1889009898) = 9 + 0 = 9.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Array[Max[#] + Min[#] &@ IntegerDigits[#] &, 120] (* Michael De Vlieger, Dec 12 2023 *)
-
Python
def a(n): d = list(map(int, str(n))); return max(d) + min(d) print([a(n) for n in range(1, 87)]) # Michael S. Branicky, Dec 12 2023
Comments