OFFSET
0,3
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
M. Diepenbroek, M. Maus, A. Stoll, Pattern Avoidance in Reverse Double Lists, Preprint 2015. See Table 3.
Index entries for linear recurrences with constant coefficients, signature (3,-2,1,-1).
FORMULA
a(n) = 3*a(n-1)-2*a(n-2)+a(n-3)-a(n-4) for n>5. - Colin Barker, Apr 12 2016
a(n) = 2*a(n-1) + a(n-3) + 2 for n>4. - Greg Dresden, Feb 09 2020
MATHEMATICA
CoefficientList[Series[(x^5-x^4-2x^3+x^2-x)/(-x^4+x^3-2x^2+3x-1), {x, 0, 40}], x] (* or *) LinearRecurrence[{3, -2, 1, -1}, {0, 1, 2, 6, 16, 36}, 40] (* Harvey P. Dale, Feb 05 2019 *)
PROG
(PARI) concat(0, Vec(x*(1-x+2*x^2+x^3-x^4)/((1-x)*(1-2*x-x^3)) + O(x^50))) \\ Colin Barker, Apr 12 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Apr 06 2016
STATUS
approved
