OFFSET
1,2
LINKS
Michael S. Branicky, Proof of form of a(n) for OEIS A372010
Index entries for linear recurrences with constant coefficients, signature (11,0,-110,100).
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
David A. Corneth and Michael S. Branicky, Apr 15 2024
STATUS
approved