OFFSET
0,2
COMMENTS
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (9,-27,27).
FORMULA
a(n) = 3^(n - 2)*(n + 2)*(n + 9)/2 = 3^n*(n^2 + 11*n + 18)/18.
G.f.: (1 - 2*x)^2/(1 - 3*x)^3.
E.g.f.: (2 + 4*x + x^2)*exp(3*x)/2. - G. C. Greubel, Oct 18 2018
MATHEMATICA
LinearRecurrence[{9, -27, 27}, {1, 5, 22}, 50] (* G. C. Greubel, Oct 18 2018 *)
PROG
(PARI) x='x+O('x^30); Vec((1-2*x)^2/(1-3*x)^3) \\ G. C. Greubel, Oct 18 2018
(Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-2*x)^2/(1-3*x)^3)); // G. C. Greubel, Oct 18 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Mar 30 2003
STATUS
approved