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”).

A251984
Smallest number such that a carry occurs when adding it to n in decimal representation.
3
9, 8, 7, 6, 5, 4, 3, 2, 1, 90, 9, 8, 7, 6, 5, 4, 3, 2, 1, 80, 9, 8, 7, 6, 5, 4, 3, 2, 1, 70, 9, 8, 7, 6, 5, 4, 3, 2, 1, 60, 9, 8, 7, 6, 5, 4, 3, 2, 1, 50, 9, 8, 7, 6, 5, 4, 3, 2, 1, 40, 9, 8, 7, 6, 5, 4, 3, 2, 1, 30, 9, 8, 7, 6, 5, 4, 3, 2, 1, 20, 9, 8, 7, 6
OFFSET
1,1
LINKS
Eric Weisstein's World of Mathematics, Carry
FORMULA
a(n) = (10 - A004151(n) mod 10) * 10^A122840(n).
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
nonn,base,look
AUTHOR
Reinhard Zumkeller, Dec 12 2014
STATUS
approved