OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..9999
Eric Weisstein's World of Mathematics, Carry
Wikipedia, Carry (arithmetic)
PROG
(Haskell)
a251984 n = if d > 0 then 10 - d else 10 * a251984 n'
where (n', d) = divMod n 10
(Python)
def a(n):
s = str(n)
t = s.strip('0')
return (10 - int(t)%10) * 10**(len(s) - len(t))
print([a(n) for n in range(1, 85)]) # Michael S. Branicky, Sep 08 2021
CROSSREFS
KEYWORD
AUTHOR
Reinhard Zumkeller, Dec 12 2014
STATUS
approved