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.

Showing 1-2 of 2 results.

A339030 T(n, k) = Sum_{p in P(n, k)} card(p), where P(n, k) is the set of set partitions of {1,2,...,n} where the largest block has size k and card(p) is the number of blocks of p. Triangle T(n, k) for 0 <= k <= n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 3, 6, 1, 0, 4, 24, 8, 1, 0, 5, 85, 50, 10, 1, 0, 6, 300, 280, 75, 12, 1, 0, 7, 1071, 1540, 525, 105, 14, 1, 0, 8, 3976, 8456, 3570, 840, 140, 16, 1, 0, 9, 15219, 47208, 24381, 6552, 1260, 180, 18, 1
Offset: 0

Views

Author

Peter Luschny, Nov 22 2020

Keywords

Examples

			Triangle starts:
0: [1]
1: [0, 1]
2: [0, 2, 1]
3: [0, 3, 6,     1]
4: [0, 4, 24,    8,     1]
5: [0, 5, 85,    50,    10,    1]
6: [0, 6, 300,   280,   75,    12,   1]
7: [0, 7, 1071,  1540,  525,   105,  14,   1]
8: [0, 8, 3976,  8456,  3570,  840,  140,  16,  1]
9: [0, 9, 15219, 47208, 24381, 6552, 1260, 180, 18, 1]
.
T(4,0) = 0  = 0*card({})
T(4,1) = 4  = 4*card({1|2|3|4}).
T(4,2) = 24 = 3*card({12|3|4, 13|2|4, 1|23|4, 14|2|3, 1|24|3, 1|2|34})
            + 2*card({12|34, 13|24, 14|23}).
T(4,3) = 8  = 2*card({123|4, 124|3, 134|2, 1|234}).
T(4,4) = 1  = 1*card({1234}).
.
Seen as the projection of a 2-dimensional statistic this is, for n = 6:
[  0   0    0     0     0    0   0]
[  0   0    0     0     0    0   6]
[  0   0    0    45   180   75   0]
[  0   0   20   180    80    0   0]
[  0   0   30    45     0    0   0]
[  0   0   12     0     0    0   0]
[  0   1    0     0     0    0   0]
The row sum projection gives row 6 of this triangle, and the column sum projection gives [0, 1, 62, 270, 260, 75, 6], which appears in a decapitated version as row 5 in A321331.
		

Crossrefs

Cf. A005493 with 1 prepended are the row sums.

Programs

  • SageMath
    def A339030Row(n):
        if n == 0: return [1]
        M = matrix(n + 1)
        for k in (1..n):
            for p in SetPartitions(n):
                if p.max_block_size() == k:
                    M[k, len(p)] += p.cardinality()
        return [sum(M[k, j] for j in (0..n)) for k in (0..n)]
    for n in (0..9): print(A339030Row(n))

A367198 T(n, k) = Sum_{m = 0..n-1} Stirling1(m+1, k)*binomial(n, m)*(-1)^(n + k), where "Stirling1" are the signed Stirling numbers of the first kind.

Original entry on oeis.org

1, 1, 2, 4, 6, 3, 15, 30, 18, 4, 76, 165, 125, 40, 5, 455, 1075, 930, 380, 75, 6, 3186, 8015, 7679, 3675, 945, 126, 7, 25487, 67536, 70042, 37688, 11550, 2044, 196, 8, 229384, 634935, 702372, 414078, 144417, 30870, 3990, 288, 9, 2293839, 6591943, 7696245, 4886390, 1885065, 463092, 73080, 7200, 405, 10
Offset: 1

Views

Author

Thomas Scheuerle, Nov 10 2023

Keywords

Comments

To use the unsigned Stirling numbers rewrite the formula as: T(n, k) = Sum_{m = 0..n-1} abs(Stirling1(m+1, k))*binomial(n, m)*(-1)^(1+m+n). Replacing in this formula Stirling1 (A008275) by Stirling2 (A048993) one obtains a shifted version of A321331.

Examples

			Triangle begins:
    1;
    1,    2;
    4,    6,   3;
   15,   30,  18,   4;
   76,  165, 125,  40,  5;
  455, 1075, 930, 380, 75, 6;
		

Crossrefs

Cf. A002411, A002467 (first column), A000027 (main diagonal), A008275.
Cf. A180191(n+1) (row sums), A321331 (variant with Stirling2).

Programs

  • Maple
    T := (n, k) -> local m; add(Stirling1(m+1, k)*binomial(n, m)*(-1)^(n + k), m = 0..n-1): seq(seq(T(n, k), k = 1..n), n = 1..9);  # Peter Luschny, Nov 10 2023
  • PARI
    T(n,k) = sum(m=0, n-1, stirling(m+1, k)*binomial(n, m)*(-1)^(n+k))

Formula

T(n+1, n) = n^2*(n+1)/2 = A002411(n).
T(n, n-2) = 6*T(n-1, n-3) - 15*T(n-2, n-4) + 20*T(n-3, n-5) - 15*T(n-4, n-6) + 6*T(n-5, n-7) - T(n-6, n-8), for n > 8.
T(n, n-k) = (-1)^k*Sum_{m=0..n-1} Stirling1(m+1, n-k)*binomial(n, m).
Showing 1-2 of 2 results.