login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A030076
a(n) = 10 - m, where m = maximal digit of n.
0
9, 8, 7, 6, 5, 4, 3, 2, 1, 9, 9, 8, 7, 6, 5, 4, 3, 2, 1, 8, 8, 8, 7, 6, 5, 4, 3, 2, 1, 7, 7, 7, 7, 6, 5, 4, 3, 2, 1, 6, 6, 6, 6, 6, 5, 4, 3, 2, 1, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 4, 4, 4, 4, 4, 4, 4, 3, 2, 1, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 8, 7, 6, 5
OFFSET
1,1
FORMULA
a(n) = 10 - A054055(n).
EXAMPLE
a(107) = 10 - max{1,0,7} = 10 - 7 = 3.
MATHEMATICA
Table[10 - Max[ IntegerDigits[n]], {n, 1, 105}] (* Robert G. Wilson v *)
PROG
(Python)
def a(n): return (10 - int(max(str(n))))
print([a(n) for n in range(1, 106)]) # Michael S. Branicky, Sep 08 2021
CROSSREFS
Cf. A054055.
Sequence in context: A112454 A304621 A138531 * A269667 A171816 A083824
KEYWORD
nonn,base,easy
AUTHOR
N. J. A. Sloane, Oct 17 2003
EXTENSIONS
More terms from Ray Chandler, Oct 17 2003
STATUS
approved