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

A279913
Largest n-digit number ending in n.
2
1, 92, 993, 9994, 99995, 999996, 9999997, 99999998, 999999999, 9999999910, 99999999911, 999999999912, 9999999999913, 99999999999914, 999999999999915, 9999999999999916, 99999999999999917, 999999999999999918, 9999999999999999919, 99999999999999999920
OFFSET
1,2
FORMULA
a(n) = n + 10^n - 10^(1 + floor(log_10(n))). - Wesley Ivan Hurt, Mar 30 2020
a(n) = 10^n - A089186(n). - Michel Marcus, Jul 25 2022
MATHEMATICA
Table[n + 10^n - 10^(1 + Floor[Log10[n]]), {n, 100}] (* Wesley Ivan Hurt, Mar 30 2020 *)
PROG
(Python)
def A279913(n): return 10**n+n-10**(len(str(n))) # Chai Wah Wu, Jul 25 2022
(PARI) a(n) = 10^n + n - 10^(#Str(n)); \\ Michel Marcus, Jul 25 2022
CROSSREFS
Cf. A266959.
Cf. A011557 (10^n), A089186.
Sequence in context: A176630 A281077 A207061 * A172449 A251934 A064203
KEYWORD
nonn,base
AUTHOR
Wesley Ivan Hurt, Dec 22 2016
STATUS
approved