OFFSET
1,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (20,-100).
FORMULA
EXAMPLE
a(1) = 9 because there are 9 one-digit numbers that are > 0.
a(2) = 171 because there are 90 two-digit numbers, so 90*2 = 180 digits are needed to write these integers, nine of these integers end with 0, and 180-9 = 171.
MAPLE
seq((9*(9*n+1))*10^(n-2), n = 1 .. 20);
MATHEMATICA
a[n_] := 9*(9*n + 1)*10^(n - 2); Array[a, 20] (* Amiram Eldar, Nov 23 2022 *)
PROG
(PARI) a(n)=(81*n+9)*10^(n-2) \\ Charles R Greathouse IV, Nov 29 2022
(Python)
def A358620(n): return 9 if n == 1 else 9*(9*n+1)*10**(n-2) # Chai Wah Wu, Nov 29 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Bernard Schott, Nov 23 2022
STATUS
approved