The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A269042 Number of permutations of [2n] avoiding the pattern 12...n. 4

%I #18 Apr 01 2017 19:13:26

%S 0,0,1,132,15767,2190688,370531683,77182248916,19835792076675,

%T 6266271456118776,2413632612087046844,1120958514818713738544,

%U 619918692943471064695593,403190647991638511052901232,304867528413299672718870216538,265248225675908889875489731636920

%N Number of permutations of [2n] avoiding the pattern 12...n.

%H Alois P. Heinz, <a href="/A269042/b269042.txt">Table of n, a(n) for n = 0..30</a>

%F a(n) = (2n)! - A269021(n).

%F a(n) = A214015(2n,n-1) for n>0.

%F a(n) ~ (2*n)!. - _Vaclav Kotesovec_, Mar 26 2016

%e a(2) = 1: 4321.

%e a(3) = 132: 165432, 216543, 261543, 265143, 265413, 265431, 316542, ..., 653412, 653421, 654132, 654213, 654231, 654312, 654321.

%p h:= proc(l) (n-> add(i, i=l)!/mul(mul(1+l[i]-j+add(`if`(

%p l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n))(nops(l))

%p end:

%p g:= (n, i, l)-> `if`(n=0 or i=1, h([l[], 1$n])^2, `if`(i<1, 0,

%p add(g(n-i*j, i-1, [l[], i$j]), j=0..n/i))):

%p a:= n-> `if`(n=0, 0, g(2*n, n-1, [])):

%p seq(a(n), n=0..15);

%t 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]];

%t 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}]]];

%t a[n_] := If[n == 0, 0, g[2n, n-1, {}]];

%t Table[a[n], {n, 0, 15}] (* _Jean-François Alcover_, Apr 01 2017, translated from Maple *)

%Y Cf. A010050, A214015, A267532, A269021.

%K nonn

%O 0,4

%A _Alois P. Heinz_, Feb 18 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 9 08:35 EDT 2024. Contains 373231 sequences. (Running on oeis4.)