OFFSET
1,6
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,2,0,-2,-1).
FORMULA
G.f.: x^4/((1-x-x^2)(1-x^2-x^3)). a(n)=a(n-1)+2*a(n-2)-2*a(n-4)-a(n-5). - R. J. Mathar, Oct 30 2008
MATHEMATICA
LinearRecurrence[{1, 2, 0, -2, -1}, {0, 0, 0, 1, 1}, 40] (* Harvey P. Dale, Jan 31 2024 *)
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, -2, 0, 2, 1]^(n-1)*[0; 0; 0; 1; 1])[1, 1] \\ Charles R Greathouse IV, Oct 03 2016
CROSSREFS
KEYWORD
nonn,easy,less
AUTHOR
Roger L. Bagula, Jun 13 2007
STATUS
approved