%I #26 Aug 27 2021 02:36:20
%S 1,0,1,0,1,1,0,2,1,1,0,4,3,2,1,0,10,7,5,3,1,0,26,20,14,11,4,1,0,76,56,
%T 44,31,19,5,1,0,232,182,139,106,69,29,6,1,0,764,589,475,351,265,127,
%U 41,7,1,0,2620,2088,1658,1303,971,583,209,55,8,1
%N Number T(n,k) of standard Young tableaux with n cells and largest value n in row k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
%C Also the number of ballot sequences of length n having last value k.
%C Also the number of standard Young tableaux with n cells where the row containing the largest value n has length k.
%C Also the number of ballot sequences of length n where the last value has multiplicity k.
%C T(0,0) = 1 by convention.
%C Columns k=0-2 give: A000007, A000085(n-1), A238124(n-1).
%C T(2n,n) gives A246731.
%C Row sums give A000085.
%H Joerg Arndt and Alois P. Heinz, <a href="/A238750/b238750.txt">Rows n = 0..60, flattened</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Young_tableau">Young tableau</a>
%e The 10 tableaux with n=4 cells sorted by the number of the row containing the largest value 4 are:
%e :[1 4] [1 2 4] [1 3 4] [1 2 3 4]:[1 2] [1 3] [1 2 3]:[1 2] [1 3]:[1]:
%e :[2] [3] [2] :[3 4] [2 4] [4] :[3] [2] :[2]:
%e :[3] : :[4] [4] :[3]:
%e : : : :[4]:
%e : --------------1-------------- : --------2-------- : ----3---- : 4 :
%e Their corresponding ballot sequences are: [1,2,3,1], [1,1,2,1], [1,2,1,1], [1,1,1,1], [1,1,2,2], [1,2,1,2], [1,1,1,2], [1,1,2,3], [1,2,1,3], [1,2,3,4]. Thus row 4 = [0, 4, 3, 2, 1].
%e Triangle T(n,k) begins:
%e 00: 1;
%e 01: 0, 1;
%e 02: 0, 1, 1;
%e 03: 0, 2, 1, 1;
%e 04: 0, 4, 3, 2, 1;
%e 05: 0, 10, 7, 5, 3, 1;
%e 06: 0, 26, 20, 14, 11, 4, 1;
%e 07: 0, 76, 56, 44, 31, 19, 5, 1;
%e 08: 0, 232, 182, 139, 106, 69, 29, 6, 1;
%e 09: 0, 764, 589, 475, 351, 265, 127, 41, 7, 1;
%e 10: 0, 2620, 2088, 1658, 1303, 971, 583, 209, 55, 8, 1;
%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) end:
%p g:= proc(l) local n; n:=nops(l); `if`(n=0, 1, add(
%p `if`(i=n or l[i]>l[i+1], x^i *h(subsop(i=
%p `if`(i=n and l[n]=1, NULL, l[i]-1), l)), 0), i=1..n))
%p end:
%p b:= (n, i, l)-> `if`(n=0 or i=1, g([l[], 1$n]),
%p add(b(n-i*j, i-1, [l[], i$j]), j=0..n/i)):
%p T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, n, [])):
%p seq(T(n), n=0..12);
%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[l_] := With[{ n = Length[l]}, If[n == 0, 1, Sum[
%t If[i == n || l[[i]] > l[[i + 1]], x^i *h[ReplacePart[l, i ->
%t If[i == n && l[[n]] == 1, Nothing, l[[i]] - 1]]], 0], {i, n}]]];
%t b[n_, i_, l_] := If[n == 0 || i == 1, g[Join[l, Table[1, {n}]]],
%t Sum[b[n - i*j, i - 1, Join[l, Table[i, {j}]]], {j, 0, n/i}]];
%t T[n_] := CoefficientList[b[n, n, {}], x];
%t Table[T[n], {n, 0, 12}] // Flatten (* _Jean-François Alcover_, Aug 27 2021, after Maple code *)
%K nonn,tabl
%O 0,8
%A _Joerg Arndt_ and _Alois P. Heinz_, Mar 04 2014