login
Number of standard Young tableaux with 2n cells such that the lengths of the first and the last row differ by n.
2

%I #9 Aug 29 2021 03:29:48

%S 1,0,3,10,119,791,8823,87515,1042823,12448912,166443706,2246438833,

%T 32782857721,488717384754,7695520330054,124248088106249,

%U 2091672883631855,36107381616662300,644987804706582806,11799406380611542654,222235188242044718908,4280160250751484220674

%N Number of standard Young tableaux with 2n cells such that the lengths of the first and the last row differ by n.

%C Also the number of ballot sequences of length 2n such that the multiplicities of the largest and the smallest value differ by n.

%H Alois P. Heinz, <a href="/A244305/b244305.txt">Table of n, a(n) for n = 0..60</a>

%F a(n) = A238707(2n,n).

%p h:= proc(l) local n; n:=nops(l); add(i, i=l)!/mul(mul(1+l[i]-j+

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

%p end:

%p g:= proc(n, i, k, l) `if`(n=0 or i<1 or `if`(l<>[], l[1], i)-1<k, 0,

%p `if`(l<>[] and l[1]-i=k, `if`(irem(n, i, 'j')=0, h([l[], i$j]),

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

%p end:

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

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

%t h[l_] := With[{n = Length[l]}, Total[l]!/Product[Product[1+l[[i]]-j+

%t Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, l[[i]]}], {i, n}]];

%t g[n_, i_, k_, l_] := If[n == 0 || i<1 || If[l != {}, l[[1]], i]-1<k, 0,

%t If[l != {} && l[[1]] - i == k, j = Quotient[n, i];

%t If[Mod[n, i] == 0, h[Join[l, Table[i, {j}]]], 0],

%t Sum[g[n - i*j, i-1, k, Join[l, Table[i, {j}]]], {j, 0, n/i}]]];

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

%t Table[a[n], {n, 0, 25}] (* _Jean-François Alcover_, Aug 29 2021, after Maple code *)

%Y Cf. A238707.

%K nonn

%O 0,3

%A _Joerg Arndt_ and _Alois P. Heinz_, Jun 25 2014