OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Robert Munafo, Eventually oscillating recurrence formulas, MCS52150530
Index entries for linear recurrences with constant coefficients, signature (1,1,0,-2,1).
FORMULA
G.f.: (2 + x - x^2 + x^3 + 2*x^4)/((1 - x)^2*(1 + x - x^3)). [Bruno Berselli, May 26 2014]
MATHEMATICA
CoefficientList[Series[(2 + x - x^2 + x^3 + 2 x^4)/((1 - x)^2 (1 + x - x^3)), {x, 0, 60}], x]
LinearRecurrence[{1, 1, 0, -2, 1}, {2, 3, 4, 8, 10}, 80] (* Harvey P. Dale, Aug 27 2014 *)
PROG
(Magma) I:=[2, 3, 4]; [n le 3 select I[n] else -Self(n-1)+Self(n-3)+5*(n-2): n in [1..60]];
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Vincenzo Librandi, May 22 2014
STATUS
approved