OFFSET
0,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,-11,6).
FORMULA
E.g.f.: exp(3*x) - 3*exp(2*x) + 4*exp(x) - 2.
From Colin Barker, Jul 07 2013: (Start)
a(n) = 4-3*2^n+3^n for n>0.
a(n) = 6*a(n-1)-11*a(n-2)+6*a(n-3) for n>3.
G.f.: x*(1 - 5*x + 12*x^2) / ((1 - x)*(1 - 2*x)*(1 - 3*x)).
(End)
MATHEMATICA
With[{nmax = 50}, CoefficientList[Series[Exp[3*x] - 3*Exp[2*x] + 4*Exp[x] - 2, {x, 0, nmax}], x]*Range[0, nmax]!] (* G. C. Greubel, Oct 06 2017 *)
LinearRecurrence[{6, -11, 6}, {0, 1, 1, 7}, 30] (* Harvey P. Dale, Aug 07 2023 *)
PROG
(PARI) x='x+O('x^50); concat([0], Vec(serlaplace(exp(3*x)-3*exp(2*x) +4*exp(x)-2))) \\ G. C. Greubel, Oct 06 2017
(PARI) concat(0, Vec(x*(1 - 5*x + 12*x^2) / ((1 - x)*(1 - 2*x)*(1 - 3*x)) + O(x^30))) \\ Colin Barker, Oct 13 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Goran Kilibarda, Vladeta Jovovic, May 24 2004
STATUS
approved