OFFSET
0,3
LINKS
Index entries for linear recurrences with constant coefficients, signature (2,0,-1,1).
FORMULA
a(n) = 2*a(n-1) -a(n-3) +a(n-4); 4 initial terms required.
G.f. x*(x-1)*(1+x) / ( -1+2*x-x^3+x^4 ). - R. J. Mathar, Nov 12 2012
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; 1, -1, 0, 2]^n*[0; 1; 2; 3])[1, 1] \\ Charles R Greathouse IV, Aug 16 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved