OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,-5,2).
FORMULA
From Colin Barker, Jun 24 2012: (Start)
a(n) = 4*a(n-1) - 5*a(n-2) + 2*a(n-3).
G.f.: 2*x*(1 + x)/((1 - x)^2*(1 - 2*x)). (End)
E.g.f.: 2*exp(x)*(3*exp(x) - 2*x - 3). - Stefano Spezia, May 15 2023
MATHEMATICA
CoefficientList[Series[2 x (1 + x)/((1 - x)^2 (1 - 2 x)), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 05 2012 *)
PROG
(Magma) I:=[0, 2, 10]; [n le 3 select I[n] else 4*Self(n-1)-5*Self(n-2)+2*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jul 04 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved