OFFSET
0,4
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,-1,3,-2).
FORMULA
a(n) = a(n-1) - a(n-2) + 3 a(n-3) - 2 a(n-4), with a(0) = a(1) = 1, a(2) = 0 and a(3) = 2. - Jean-François Alcover, Apr 06 2016
a(n) = n+1 - a(n-1) - 2*a(n-2), with a(0) = a(1) = 1. - Michel Marcus, Apr 06 2016
MATHEMATICA
RecurrenceTable[{a[1] == a[2] == 1, a[n] == n - a[n-1] - 2 a[n-2]}, a, {n, 50}] (* Jean-François Alcover, Apr 06 2016 *)
LinearRecurrence[{1, -1, 3, -2}, {1, 1, 0, 2}, 50] (* Harvey P. Dale, Sep 14 2019 *)
PROG
(PARI) Vec(1/((1-x)*(1+x^2-2*x^3)) + O(x^60)) \\ Michel Marcus, Apr 06 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved