login
A116713
Number of permutations of length n which avoid the patterns 123, 2431, 4132.
1
1, 2, 5, 12, 24, 45, 83, 154, 290, 555, 1077, 2112, 4172, 8281, 16487, 32886, 65670, 131223, 262313, 524476, 1048784, 2097381, 4194555, 8388882, 16777514, 33554755, 67109213, 134218104, 268435860, 536871345, 1073742287, 2147484142, 4294967822, 8589935151
OFFSET
1,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
Sequence in context: A116721 A294868 A192981 * A261369 A116714 A023615
KEYWORD
nonn,easy
AUTHOR
Lara Pudwell, Feb 26 2006
STATUS
approved