|
|
A372010
|
|
a(n) is the n-digit number k such that R(k)/k is maximal for any n-digit number.
|
|
1
|
|
|
1, 19, 109, 1099, 10099, 100999, 1000999, 10009999, 100009999, 1000099999, 10000099999, 100000999999, 1000000999999, 10000009999999, 100000009999999, 1000000099999999, 10000000099999999, 100000000999999999, 1000000000999999999, 10000000009999999999, 100000000009999999999
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 1 0^(n-1-h) 9^h, where h = floor(n/2) and ^ represents repeated concatenation (see links for proof).
a(n) = 10^(n-1) + 10 ^ floor(n / 2) - 1.
G.f.: x*(1 + 8*x - 100*x^2 + 10*x^3)/((1 - x)*(1 - 10*x)*(1 - 10*x^2)). - Stefano Spezia, Apr 16 2024
|
|
EXAMPLE
|
a(2) = 19 as k = 19 is the two digit number k that produces the largest ratio R(k)/k = 91/19 of all two-digit numbers.
|
|
MATHEMATICA
|
Table[10^(n-1) + 10^Floor[n/2] - 1, {n, 25}] (* Paolo Xausa, Apr 23 2024 *)
|
|
PROG
|
(PARI) a(n) = 10^(n-1) + 10 ^ (n \ 2) - 1
(Python) def a(n): return 10**(n-1) + 10**(n//2) - 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|