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.

A323128 Number T(n,k) of colored set partitions of [n] where elements of subsets have distinct colors and exactly k colors are used; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 4, 0, 1, 18, 30, 0, 1, 74, 360, 360, 0, 1, 310, 3450, 8880, 6240, 0, 1, 1382, 31770, 160080, 271800, 146160, 0, 1, 6510, 298662, 2635920, 8152200, 10190880, 4420080, 0, 1, 32398, 2918244, 42687960, 214527600, 468669600, 460474560, 166924800
Offset: 0

Views

Author

Alois P. Heinz, Aug 30 2019

Keywords

Examples

			T(3,2) = 18: 1a|2a3b, 1a|2b3a, 1b|2a3b, 1b|2b3a, 1a3b|2a, 1b3a|2a, 1a3b|2b, 1b3a|2b, 1a2b|3a, 1b2a|3a, 1a2b|3b, 1b2a|3b, 1a|2a|3b, 1a|2b|3a, 1b|2a|3a, 1a|2b|3b, 1b|2a|3b, 1b|2b|3a.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1,    4;
  0, 1,   18,     30;
  0, 1,   74,    360,     360;
  0, 1,  310,   3450,    8880,    6240;
  0, 1, 1382,  31770,  160080,  271800,   146160;
  0, 1, 6510, 298662, 2635920, 8152200, 10190880, 4420080;
  ...
		

Crossrefs

Columns k=0-1 give: A000007, A057427.
Row sums give A104600.
Main diagonal gives A137341.
T(2n,n) gives A324523.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1, add(k!/(k-j)!
          *binomial(n-1, j-1)*A(n-j, k), j=1..min(k, n)))
        end:
    T:= (n, k)-> add(A(n, k-i)*(-1)^i*binomial(k, i), i=0..k):
    seq(seq(T(n, k), k=0..n), n=0..10);
  • Mathematica
    A[n_, k_] := A[n, k] = If[n==0, 1, Sum[k!/(k - j)! Binomial[n - 1, j - 1]* A[n - j, k], {j, Min[k, n]}]];
    T[n_, k_] := Sum[A[n, k - i] (-1)^i Binomial[k, i], {i, 0, k}];
    Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 30 2020, after Alois P. Heinz *)