login
A116851
Number of permutations of length n which avoid the patterns 321, 31245.
0
1, 2, 5, 14, 41, 116, 307, 760, 1779, 3986, 8641, 18282, 38005, 78024, 158791, 321236, 647247, 1300630, 2609029, 5227766, 10467521, 20949692, 41917115, 83855504, 167736331, 335502586, 671040297, 1342121570, 2684290669, 5368636176, 10737335311, 21474742572
OFFSET
1,2
FORMULA
G.f.: x*(1 - 5*x + 11*x^2 - 11*x^3 + 8*x^4 - 2*x^5) / ((1 - x)^5*(1 - 2*x)).
a(n) = 5*2^n-(n+2)*(n^3+11*n+24)/12. - R. J. Mathar, Jan 12 2013
PROG
(PARI) Vec(x*(1 - 5*x + 11*x^2 - 11*x^3 + 8*x^4 - 2*x^5) / ((1 - x)^5*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Nov 01 2017
CROSSREFS
Sequence in context: A116846 A080558 A116844 * A038989 A116850 A116847
KEYWORD
nonn,easy
AUTHOR
Lara Pudwell, Feb 26 2006
STATUS
approved