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.

A339031 T(n, k) = k*P(n, k), where P(n, k) is the number of partitions of an n-set with k blocks, the largest of which has the size n - k + 1. Triangle T(n, k) for 0 <= k <= n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 6, 3, 0, 1, 8, 18, 4, 0, 1, 10, 30, 40, 5, 0, 1, 12, 45, 80, 75, 6, 0, 1, 14, 63, 140, 175, 126, 7, 0, 1, 16, 84, 224, 350, 336, 196, 8, 0, 1, 18, 108, 336, 630, 756, 588, 288, 9
Offset: 0

Views

Author

Peter Luschny, Nov 22 2020

Keywords

Examples

			Triangle starts:
0: [1]
1: [0, 1]
2: [0, 1,  2]
3: [0, 1,  6,   3]
4: [0, 1,  8,  18,   4]
5: [0, 1, 10,  30,  40,   5]
6: [0, 1, 12,  45,  80,  75,   6]
7: [0, 1, 14,  63, 140, 175, 126,   7]
8: [0, 1, 16,  84, 224, 350, 336, 196,   8]
9: [0, 1, 18, 108, 336, 630, 756, 588, 288, 9]
.
T(4, 1) =  1 = 1*card({1234})
T(4, 2) =  8 = 2*card({123|4, 124|3, 134|2, 1|234})
T(4, 3) = 18 = 3*card({12|3|4, 13|2|4, 1|23|4, 14|2|3, 1|24|3, 1|2|34})
T(4, 4) =  4 = 4*card({1|2|3|4})
		

Crossrefs

Cf. A339032 (row sums), A339030.

Programs

  • Maple
    A339031 := proc(n, k) if k = 0 then 0^n elif k = n then n
    else k*binomial(n, k-1) fi end:
    seq(seq(A339031(n, k), k=0..n), n=0..9);
  • SageMath
    # Shows the combinatorial interpretation.
    def A339031Row(n):
        if n == 0: return [1]
        M = matrix(n + 2)
        for k in (1..n):
            for p in SetPartitions(n):
                if p.max_block_size() == k:
                    M[len(p), k] += p.cardinality()
        return [M[k, n-k+1] for k in (0..n)]
    for n in (0..9): print(A339031Row(n))

Formula

T(n, k) = k*binomial(n, k - 1) for n >= 1 and 0 < k < n, and T(n, 0) = 0^n, T(n, n) = n.

A339032 Expansion of (4*x^5 - 9*x^4 + 17*x^3 - 15*x^2 + 6*x - 1)/((2*x - 1)^2*(x - 1)^3).

Original entry on oeis.org

1, 1, 3, 10, 31, 86, 219, 526, 1215, 2734, 6043, 13190, 28527, 61270, 130875, 278302, 589567, 1244894, 2621115, 5504662, 11533935, 24116806, 50331163, 104857070, 218103231, 452984206, 939523419, 1946156326, 4026531055, 8321498294, 17179868283, 35433479230
Offset: 0

Views

Author

Peter Luschny, Nov 24 2020

Keywords

Crossrefs

Row sums of A339031.
Cf. A339030.

Programs

  • Maple
    gf := (4*x^5 - 9*x^4 + 17*x^3 - 15*x^2 + 6*x - 1)/((2*x - 1)^2*(x - 1)^3):
    ser := series(gf, x, 33): seq(coeff(ser, x, n), n=0..31);
Showing 1-2 of 2 results.