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) +8*1a(n-4), a(0)=1, a(1)=8, a(2)=47, a(3)=238.
G.f.: (1-2*x)*(1-x)^2/(1-3*x)^4.
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