OFFSET
0,4
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,-1,-1,2).
FORMULA
a(n) = a(n-1) - a(n-2) - a(n-3) + 2*a(n-4). - Wesley Ivan Hurt, Jun 23 2026
MATHEMATICA
CoefficientList[Series[(1-x)^(-1)/(1+x^2+2*x^3), {x, 0, 50}], x] (* Harvey P. Dale, Apr 07 2018 *)
(* Alternative: *)
LinearRecurrence[{1, -1, -1, 2}, {1, 1, 0, -2}, 50] (* Harvey P. Dale, Apr 07 2018 *)
PROG
(PARI) a(n)=([0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1; 2, -1, -1, 1]^n*[1; 1; 0; -2])[1, 1] \\ Charles R Greathouse IV, Jun 02 2026
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved
