OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5, -4, 1).
FORMULA
a(n+3) = 5*a(n+2) - 4*a(n+1) + a(n).
G.f.: (1-x)^2/(1-5*x+4*x^2-x^3). - Colin Barker, Feb 02 2012
MATHEMATICA
CoefficientList[Series[(1-x)^2/(1-5*x+4*x^2-x^3), {x, 0, 33}], x] (* Vincenzo Librandi, Apr 18 2012 *)
LinearRecurrence[{5, -4, 1}, {1, 3, 12}, 30] (* Harvey P. Dale, Aug 15 2024 *)
PROG
(Magma) I:=[1, 3, 12]; [n le 3 select I[n] else 5*Self(n-1)-4*Self(n-2)+Self(n-3): n in [1..30]]; // Vincenzo Librandi, Apr 18 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved