OFFSET
0,3
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).
O.g.f.: (1-4x+2x^2)/(1-5x+4x^2-x^3). a(n+1)=A012772(n). - R. J. Mathar, May 28 2008
MATHEMATICA
LinearRecurrence[{5, -4, 1}, {1, 1, 3}, 30] (* Vincenzo Librandi, Apr 18 2012 *)
PROG
(Magma) I:=[1, 1, 3]; [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
