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 (5,-9,7,-2).
FORMULA
G.f.: x*(1 - 3*x + 4*x^2 - 2*x^3 - 3*x^4 + 2*x^5) / ((1 - x)^3*(1 - 2*x)).
From Colin Barker, Oct 19 2017: (Start)
a(n) = (-4 + 2^n - n + n^2) / 2 for n>2.
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4) for n>6.
(End)
MAPLE
A116713 := proc(n) coeftayl(x*(2*x^5-3*x^4-2*x^3+4*x^2-3*x+1)/(x-1)^3/(2*x-1), x=0, n) ; end: seq(A116713(n), n=1..50) ; # R. J. Mathar, Jan 23 2008
PROG
(PARI) Vec(x*(1 - 3*x + 4*x^2 - 2*x^3 - 3*x^4 + 2*x^5) / ((1 - x)^3*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Oct 19 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lara Pudwell, Feb 26 2006
STATUS
approved