OFFSET
0,12
REFERENCES
R. Stanley, Enumerative Combinatorics, volume 1, second edition, Cambridge University Press (2012), p.295.
LINKS
Alois P. Heinz, Rows n = 0..50, flattened
FORMULA
Sum_{k=1..ceiling((n-1)^2/2)} k * T(n,k) = A337193(n).
EXAMPLE
Triangle T(n,k) begins:
1;
1;
0, 1;
0, 1, 1;
0, 0, 1, 1, 2, 1;
0, 0, 1, 2, 3, 4, 3, 2, 1;
0, 0, 0, 1, 2, 5, 7, 9, 10, 10, 8, 5, 3, 1;
...
T(6,5) = 5 because we have: {2, 1, 5, 4, 6, 3}, {2, 1, 6, 3, 5, 4},
{3, 1, 5, 2, 6, 4}, {3, 2, 4, 1, 6, 5}, {4, 1, 3, 2, 6, 5}.
MAPLE
b:= proc(u, o, t) option remember; expand(`if`(u+o=0, 1, add(
x^`if`(t=0, o-1+j, u-j)*b(o-1+j, u-j, 1-t), j=1..u)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0$2)):
seq(T(n), n=0..10); # Alois P. Heinz, Aug 17 2020
MATHEMATICA
Table[a = Drop[Subsets[Table[i, {i, 1, n - 1, 2}]], 1]; f[list_] := (-1)^(Floor[n/2] - Length[list]) QBinomial[n, list[[1]], q] Product[
QBinomial[n - list[[i]], list[[i + 1]] - list[[i]], q], {i, 1,
Length[list] - 1}]; CoefficientList[Expand[FunctionExpand[Total[Map[f, a]] + (-1)^(Floor[n/2])]], q], {n, 0, 8}] // Grid
(* Second program: *)
b[u_, o_, t_] := b[u, o, t] = Expand[If[u + o == 0, 1, Sum[x^If[t == 0, o - 1 + j, u - j]*b[o - 1 + j, u - j, 1 - t], {j, 1, u}]]];
T[n_] := CoefficientList[b[n, 0, 0], x];
T /@ Range[0, 10] // Flatten (* Jean-François Alcover, Jan 02 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Geoffrey Critzer, Aug 17 2020
STATUS
approved