login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A269042
Number of permutations of [2n] avoiding the pattern 12...n.
4
0, 0, 1, 132, 15767, 2190688, 370531683, 77182248916, 19835792076675, 6266271456118776, 2413632612087046844, 1120958514818713738544, 619918692943471064695593, 403190647991638511052901232, 304867528413299672718870216538, 265248225675908889875489731636920
OFFSET
0,4
LINKS
FORMULA
a(n) = (2n)! - A269021(n).
a(n) = A214015(2n,n-1) for n>0.
a(n) ~ (2*n)!. - Vaclav Kotesovec, Mar 26 2016
EXAMPLE
a(2) = 1: 4321.
a(3) = 132: 165432, 216543, 261543, 265143, 265413, 265431, 316542, ..., 653412, 653421, 654132, 654213, 654231, 654312, 654321.
MAPLE
h:= proc(l) (n-> add(i, i=l)!/mul(mul(1+l[i]-j+add(`if`(
l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n))(nops(l))
end:
g:= (n, i, l)-> `if`(n=0 or i=1, h([l[], 1$n])^2, `if`(i<1, 0,
add(g(n-i*j, i-1, [l[], i$j]), j=0..n/i))):
a:= n-> `if`(n=0, 0, g(2*n, n-1, [])):
seq(a(n), n=0..15);
MATHEMATICA
h[l_] := Function[n, Total[l]!/Product[Product[1+l[[i]]-j+Sum[If[l[[k]] >= j, 1, 0], { k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}]][Length[l]];
g[n_, i_, l_] := If[n == 0 || i == 1, h[Join[l, Table[1, {n}]]]^2, If[i < 1, 0, Sum[g[n - i*j, i-1, Join[l, Table[i, {j}]]], {j, 0, n/i}]]];
a[n_] := If[n == 0, 0, g[2n, n-1, {}]];
Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Apr 01 2017, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Feb 18 2016
STATUS
approved