OFFSET
0,2
COMMENTS
From Bernard Schott, Nov 12 2022: (Start)
For n >= 1, a(n-1) is the number of digits 1 (or any nonzero digit) that are necessary to write all the n-digit integers, while the corresponding number of digits 0 to write all these n-digit integers is A212704(n-1) for n >=2.
E.g.: a(2-1) = 19 since 19 digits 2's are required to write integers with a digit 2 from 10 up to 99: {12, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 42, 52, 62, 72, 82, 92}.
First difference of A053541. (End)
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..300
Index entries for linear recurrences with constant coefficients, signature (20,-100).
FORMULA
a(n) = 20*a(n-1) - 100*a(n-2); a(0)=1, a(1)=19.
a(0)=1; for n>= 1, a(n) = (9*n+10)*10^(n-1) = 10^(n-1)*A017173(n+1).
a(n) = Sum_{k=0..n} (k+1)*9^k*binomial(n, k).
G.f.: (1-x)/(1-10*x)^2.
E.g.f.: exp(10*x)*(1 + 9*x). - Stefano Spezia, Jan 31 2025
MATHEMATICA
CoefficientList[Series[(1 - x)/(1 - 10 x)^2, {x, 0, 30}], x] (* Vincenzo Librandi, Aug 06 2013 *)
LinearRecurrence[{20, -100}, {1, 19}, 20] (* Harvey P. Dale, Dec 28 2023 *)
PROG
(Magma) [(9*n+10)*10^(n-1): n in [0..25]]; // Vincenzo Librandi, Aug 06 2013
CROSSREFS
KEYWORD
easy,base,nonn,changed
AUTHOR
Paul Barry, Mar 04 2003
STATUS
approved