OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (9,-27,27).
FORMULA
a(n) = (n^2+8*n+9)3^(n-2).
G.f.: (1-2*x)*(1-x)/(1-3x)^3.
MATHEMATICA
CoefficientList[Series[(1 - 2 x) (1 - x) / (1 - 3 x)^3, {x, 0, 40}], x] (* Vincenzo Librandi, Aug 07 2013 *)
PROG
(Magma) [(n^2+8*n+9)*3^(n-2): n in [0..25]]; // Vincenzo Librandi, Aug 07 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Mar 16 2003
STATUS
approved