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,1,1,1,-1).
FORMULA
G.f.: -x*(x-1)*(2*x^2+2*x+1)/((x+1)*(x^4-2*x^3+x^2-2*x+1)). - Maksym Voznyy, Aug 12 2009
MATHEMATICA
LinearRecurrence[{1, 1, 1, 1, -1}, {0, 1, 2, 3, 4}, 50] (* G. C. Greubel, Oct 14 2016 *)
PROG
(PARI) a(n)=([0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1; -1, 1, 1, 1, 1]^n*[0; 1; 2; 3; 4])[1, 1] \\ Charles R Greathouse IV, Jun 03 2026
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mohamed Bouhamida, Dec 13 2007
STATUS
approved
