login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Largest n-digit number ending in n.
2

%I #25 Jul 25 2022 04:03:00

%S 1,92,993,9994,99995,999996,9999997,99999998,999999999,9999999910,

%T 99999999911,999999999912,9999999999913,99999999999914,

%U 999999999999915,9999999999999916,99999999999999917,999999999999999918,9999999999999999919,99999999999999999920

%N Largest n-digit number ending in n.

%F a(n) = n + 10^n - 10^(1 + floor(log_10(n))). - _Wesley Ivan Hurt_, Mar 30 2020

%F a(n) = 10^n - A089186(n). - _Michel Marcus_, Jul 25 2022

%t Table[n + 10^n - 10^(1 + Floor[Log10[n]]), {n, 100}] (* _Wesley Ivan Hurt_, Mar 30 2020 *)

%o (Python)

%o def A279913(n): return 10**n+n-10**(len(str(n))) # _Chai Wah Wu_, Jul 25 2022

%o (PARI) a(n) = 10^n + n - 10^(#Str(n)); \\ _Michel Marcus_, Jul 25 2022

%Y Cf. A266959.

%Y Cf. A011557 (10^n), A089186.

%K nonn,base

%O 1,2

%A _Wesley Ivan Hurt_, Dec 22 2016