login
A383351
Triangle read by rows: T(n, k) is the number of partitions of a 2-colored set of n objects into k parts where 0 <= k <= n, and each part is one of 2 kinds.
2
1, 0, 4, 0, 6, 10, 0, 8, 24, 20, 0, 10, 53, 60, 35, 0, 12, 88, 164, 120, 56, 0, 14, 144, 348, 370, 210, 84, 0, 16, 208, 672, 904, 700, 336, 120, 0, 18, 299, 1174, 1998, 1870, 1183, 504, 165, 0, 20, 400, 1952, 3952, 4524, 3360, 1848, 720, 220
OFFSET
0,3
FORMULA
T(n,n) = binomial(n + 3, 3) = A000292(n + 1).
T(n,1) = 2*n + 2 for n >= 1.
T(n,k+1) = A383352(n,k+1) - A383352(n,k) for 0 <= k < n.
EXAMPLE
Triangle starts:
0 : [1]
1 : [0, 4]
2 : [0, 6, 10]
3 : [0, 8, 24, 20]
4 : [0, 10, 53, 60, 35]
5 : [0, 12, 88, 164, 120, 56]
6 : [0, 14, 144, 348, 370, 210, 84]
7 : [0, 16, 208, 672, 904, 700, 336, 120]
8 : [0, 18, 299, 1174, 1998, 1870, 1183, 504, 165]
9 : [0, 20, 400, 1952, 3952, 4524, 3360, 1848, 720, 220]
10 : [0, 22, 534, 3052, 7394, 9834, 8652, 5488, 2724, 990, 286]
...
PROG
(Python)
from sympy import binomial
from sympy.utilities.iterables import partitions
def calc_w(k , m):
s = 0
for p in partitions(m, m=k+1):
fact = 1
j = k + 1
for x in p :
fact *= binomial(j, p[x]) * (x + 1) ** p[x]
j -= p[x]
s += fact
return s
def t_row(n):
if n == 0 : return [1]
t = list([0] * n)
for p in partitions( n):
fact = 1
s = 0
for k in p :
s += p[k]
fact *= calc_w(k, p[k])
if s > 0 :
t[s - 1] += fact
return [0] + t
CROSSREFS
Main diagonal gives A000292(n+1).
Partial row sums are A383352.
Cf. A382342 (1-colored), A382339 (1-kind), A008284 (1-colored, 1-kind).
Sequence in context: A262246 A194193 A265644 * A296230 A383352 A222889
KEYWORD
nonn,tabl
AUTHOR
Peter Dolland, Apr 24 2025
STATUS
approved