OFFSET
0,2
COMMENTS
Also number of (n+1)-digit numbers with exactly one '9' in their decimal expansion. Nine can be replaced by any nonzero digit 1..9. - Zak Seidov, Jul 11 2016
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (18,-81).
FORMULA
a(n) = 18*a(n-1)-81*a(n-2), a(0)=0, a(1)=17.
a(n) = (8n+9)*9^(n-1).
a(n) = Sum_{k=0..n} (k+1)*8^k*binomial(n, k).
G.f.: (1-x)/(1-9x)^2.
E.g.f.: (1 + 8*x)*exp(9*x). - Ilya Gutkovskiy, Jul 18 2016
MATHEMATICA
Table[(8n+9)9^(n-1), {n, 0, 30}] (*or*) LinearRecurrence[{18, -81}, {1, 17}, 40] (* Vincenzo Librandi, Feb 23 2012 *)
PROG
(PARI) a(n) = (8*n+9)*9^(n-1); \\ Altug Alkan, Jul 18 2016
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Paul Barry, Mar 04 2003
STATUS
approved