login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A083824 A087029 A104348 * A298372 A089186 A055120
KEYWORD
nonn,base,look
AUTHOR
Reinhard Zumkeller, Dec 12 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 06:44 EDT 2024. Contains 371782 sequences. (Running on oeis4.)