cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A357367 Triangle read by rows. T(n, k) = binomial(n - 1, k - 1)*(n + k)! / k!.

Original entry on oeis.org

1, 0, 2, 0, 6, 12, 0, 24, 120, 120, 0, 120, 1080, 2520, 1680, 0, 720, 10080, 40320, 60480, 30240, 0, 5040, 100800, 604800, 1512000, 1663200, 665280, 0, 40320, 1088640, 9072000, 33264000, 59875200, 51891840, 17297280
Offset: 0

Views

Author

Peter Luschny, Sep 26 2022

Keywords

Comments

T(n, k) is the cardinality of the set of all phylogenetic trees with linearly ordered children having n + 1 leaves and k internal vertices. (Proposition 4.16 in Deb and Sokal). - Peter Luschny, Aug 06 2025

Examples

			Triangle T(n, k) starts:
  [0] 1;
  [1] 0,     2;
  [2] 0,     6,      12;
  [3] 0,    24,     120,     120;
  [4] 0,   120,    1080,    2520,     1680;
  [5] 0,   720,   10080,   40320,    60480,    30240;
  [6] 0,  5040,  100800,  604800,  1512000,  1663200,   665280;
  [7] 0, 40320, 1088640, 9072000, 33264000, 59875200, 51891840, 17297280;
		

Crossrefs

Cf. A032037 (row sums), A271703, A386789.

Programs

  • Maple
    T := (n, k) -> add((-1)^(m + k) * binomial(n + k, n + m) * binomial(n + m - 1, m - 1) * (n + m)! / m!, m = 0..k):
    seq(print(seq(T(n, k), k = 0..n)), n = 0..8);
    T := proc(n, k) option remember; if n = 0 and k = 0 then 1 elif k <= 0 or n < 0 then 0 else 2*(n + k - 1)*T(n-1, k-1) + (n + 2*k - 1)*T(n-1, k) fi end:
    for n from 0 to 6 do seq(T(n, k), k = 0..n) od; # Peter Luschny, Aug 06 2025
  • Mathematica
    T[n_, k_] := Sum[(-1)^(m + k)*Binomial[n + k, n + m]*Binomial[n + m - 1, m - 1]*(n + m)!/m!, {m, 0, k}]; Table[T[n, k], {n, 0, 7}, {k, 0, n}] // Flatten (* Michael De Vlieger, Aug 05 2025 *)
  • SageMath
    def Lah(n, k): return binomial(n, k) * falling_factorial(n - 1, n - k)
    def T(n, k): return (sum((-1)^(m + k) * binomial(n + k, n + m) * Lah(n + m, m)
            for m in range(k + 1)))
    for n in range(8): print([T(n, k) for k in range(n+1)])

Formula

T(n, k) = Sum_{m=0..k} (-1)^(m + k) * binomial(n + k, n + m) * L(n + m, m), where L denotes the unsigned Lah numbers A271703.
T(n, k) = Sum_{m=0..k} (-1)^(m + k) * binomial(n + k, n + m) * binomial(n + m - 1, m - 1) * (n + m)! / m!.
T(n, k) = (2*(n + k - 1))*T(n-1, k-1) + (n + 2*k - 1)*T(n-1, k) with suitable boundary conditions (from Deb and Sokal). - Peter Luschny, Aug 06 2025

Extensions

New name using a formula of Deb and Sokal by Peter Luschny, Aug 06 2025