OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Lara Pudwell, Systematic Studies in Pattern Avoidance, 2005.
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
G.f.: x*(1 - 2*x + 3*x^2 - x^4) / (1 - x)^4.
For n >= 2, a(n) = (n^3 + 3n^2 - 16n + 24)/6. - Franklin T. Adams-Watters, Sep 16 2006
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>5. - Colin Barker, Oct 24 2017
MAPLE
A116721 := proc(n) coeftayl(-x*(x^4-3*x^2+2*x-1)/(x-1)^4, x=0, n) ; end: seq(A116721(n), n=1..60) ; # R. J. Mathar, Jan 23 2008
PROG
(PARI) Vec(x*(1 - 2*x + 3*x^2 - x^4) / (1 - x)^4 + O(x^100)) \\ Colin Barker, Oct 24 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lara Pudwell, Feb 26 2006
EXTENSIONS
More terms from R. J. Mathar, Jan 23 2008
STATUS
approved