OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,2,-1,-1).
FORMULA
G.f.: (1 - x^2 + 2x^3 + x^4)/( (1-x^2)*(1-x-x^2) ).
a(n) = 0^n - (3 + (-1)^n)/2 + 2*Fibonacci(n+1).
MATHEMATICA
Join[{1}, LinearRecurrence[{1, 2, -1, -1}, {1, 2, 5, 8}, 25]] (* G. C. Greubel, Sep 11 2016 *)
CoefficientList[Series[(1 - x^2 + 2 x^3 + x^4) / ((1 - x^2) (1 - x - x^2)), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 12 2016 *)
PROG
(Magma) [0^n-(3+(-1)^n)/2+2*Fibonacci(n+1):n in [0..40]]; // Vincenzo Librandi, Sep 12 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jan 07 2009
STATUS
approved