OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (12,-54,108,-81).
FORMULA
a(n) = (2*n^3 + 30*n^2 + 103*n + 81) * 3^(n-4).
a(n) = 12*a(n-1) - 54*a(n-2) + 108*a(n-3) - 81*a(n-4), n>=4.
G.f.: (1-2*x)*(1-x)^2/(1-3*x)^4.
E.g.f.: ((2/3)*x^3 + 4*x^2 + 5*x + 1)*exp(3*x). - Enrique Navarrete, Nov 30 2025
MATHEMATICA
CoefficientList[Series[(1 - 2 x) (1 - x)^2 / (1 - 3 x)^4, {x, 0, 40}], x] (* Vincenzo Librandi, Aug 07 2013 *)
LinearRecurrence[{12, -54, 108, -81}, {1, 8, 47, 238}, 30] (* Harvey P. Dale, Jul 27 2015 *)
PROG
(Magma) [(2*n^3+30*n^2 + 103*n + 81)*3^(n - 4): n in [0..25]]; // Vincenzo Librandi, Aug 07 2013
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Mar 16 2003
STATUS
approved
