OFFSET
1,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (6,-11,6).
FORMULA
From Alexander R. Povolotsky, Jan 07 2011: (Start)
G.f.: 2*x*(12 - 35*x + 24*x^2) / (1 - 6*x + 11*x^2 - 6*x^3)
a(n+2) = -6*a(n) + 5*a(n+1)+2. (End)
a(n) = 6*a(n-1) - 11*a(n-2) + 6*a(n-3). - G. C. Greubel, Feb 25 2017
E.g.f.: exp(x) - 2*exp(2*x) + 9*exp(3*x) - 8. - G. C. Greubel, Jul 23 2017
MAPLE
MATHEMATICA
CoefficientList[Series[-2*x*(12 - 35*x + 24*x^2)/(-1 + 6*x - 11*x^2 + 6*x^3), {x, 0, 50}], x] (* or *) LinearRecurrence[{6, -11, 6}, {24, 74, 228}, 50] (* G. C. Greubel, Feb 25 2017 *)
PROG
(Magma) [1 - 2^(n+1) + 3^(n+2): n in [1..40]]; // Vincenzo Librandi, Apr 05 2011
(PARI) x='x+O('x^50); Vec(-2*x*(12 - 35*x + 24*x^2) / (-1 + 6*x - 11*x^2 + 6*x^3)) \\ G. C. Greubel, Feb 25 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amir H. Farrahi, Feb 06 2011
EXTENSIONS
Corrected and edited by Bruno Berselli, Apr 04 2011
STATUS
approved