OFFSET
1,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (10,-9).
FORMULA
G.f.: 81*x^2/((1-x)*(1-9*x)).
a(n) = a(n-1) + 9^n = (9^(n+1) - 81)/8 = 10*a(n-1) - 9*a(n-2).
a(n) = A052386(n) - 9. - Michel Marcus, Sep 25 2014
MAPLE
MATHEMATICA
RecurrenceTable[{a[1] == 0, a[n] == a[n-1] + 9^n}, a, {n, 30}] (* or *) CoefficientList[Series[81 x / ((1 - x) (1 - 9 x)), {x, 0, 30}], x]
PROG
(Magma) [0] cat [&+[9^k: k in [2..n]]: n in [2..30]]; /* or */ [(9^(n+1)-81)/8: n in [1..30]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Sep 25 2014
STATUS
approved