A382241 Triangle read by rows: T(n,k) is the number of partitions of a 4-colored set of n objects into at most k parts with 0 <= k <= n.
1, 0, 4, 0, 10, 20, 0, 20, 60, 80, 0, 35, 170, 270, 305, 0, 56, 396, 816, 1016, 1072, 0, 84, 868, 2238, 3188, 3538, 3622, 0, 120, 1716, 5616, 9196, 10996, 11556, 11676, 0, 165, 3235, 13140, 24975, 32400, 35445, 36285, 36450, 0, 220, 5720, 28900, 63680, 90700, 104060, 108820, 110020, 110240
Offset: 0
Examples
Triangle starts: 0 : [1] 1 : [0, 4] 2 : [0, 10, 20] 3 : [0, 20, 60, 80] 4 : [0, 35, 170, 270, 305] 5 : [0, 56, 396, 816, 1016, 1072] 6 : [0, 84, 868, 2238, 3188, 3538, 3622] 7 : [0, 120, 1716, 5616, 9196, 10996, 11556, 11676] 8 : [0, 165, 3235, 13140, 24975, 32400, 35445, 36285, 36450] 9 : [0, 220, 5720, 28900, 63680, 90700, 104060, 108820, 110020, 110240] 10 : [0, 286, 9752, 60232, 154262, 242254, 294140, 315980, 323000, 324650, 324936] ...
Programs
-
Maple
b:= proc(n, i) option remember; expand(`if`(n=0, 1, `if`(i<1, 0, add( b(n-i*j, min(n-i*j, i-1))*binomial(i*(i^2+6*i+11)/6+j, j)*x^j, j=0..n/i)))) end: T:= proc(n, k) option remember; `if`(k<0, 0, T(n, k-1)+coeff(b(n$2), x, k)) end: seq(seq(T(n, k), k=0..n), n=0..10); # Alois P. Heinz, Mar 19 2025
-
Python
from sympy import binomial from sympy.utilities.iterables import partitions from sympy.combinatorics.partitions import IntegerPartition colors = 4 - 1 # the number of colors - 1 def a382241_row( n): if n == 0 : return [1] t = list( [0] * n) for p in partitions( n): p = IntegerPartition( p).as_dict() fact = 1 s = 0 for k in p : s += p[k] fact *= binomial( binomial( k + colors, colors) + p[k] - 1, p[k]) if s > 0 : t[s - 1] += fact for i in range( n - 1): t[i+1] += t[i] return [0] + t
Formula
T(n,1) = binomial(n + 3, 3) = A000292(n + 1) for n >= 1.
Comments