login
A382041
Triangle read by rows: T(n, k) is the number of partitions of n with at most k parts where 0 <= k <= n, and each part is one of four kinds.
2
1, 0, 4, 0, 4, 14, 0, 4, 20, 40, 0, 4, 30, 70, 105, 0, 4, 36, 116, 196, 252, 0, 4, 46, 170, 350, 490, 574, 0, 4, 52, 236, 556, 896, 1120, 1240, 0, 4, 62, 310, 845, 1505, 2079, 2415, 2580, 0, 4, 68, 400, 1200, 2400, 3584, 4480, 4960, 5180, 0, 4, 78, 494, 1670, 3626, 5910, 7842, 9162, 9822, 10108
OFFSET
0,3
COMMENTS
Two unrestricted unary predicates on the parts set result in four kinds: The intersection, the both differences and the complement of the union.
The 1-kind case is Euler's table A026820.
The 2-kind case is A381895.
The 3-kind case is A382025.
EXAMPLE
Triangle starts:
0 : [1]
1 : [0, 4]
2 : [0, 4, 14]
3 : [0, 4, 20, 40]
4 : [0, 4, 30, 70, 105]
5 : [0, 4, 36, 116, 196, 252]
6 : [0, 4, 46, 170, 350, 490, 574]
7 : [0, 4, 52, 236, 556, 896, 1120, 1240]
8 : [0, 4, 62, 310, 845, 1505, 2079, 2415, 2580]
9 : [0, 4, 68, 400, 1200, 2400, 3584, 4480, 4960, 5180]
10 : [0, 4, 78, 494, 1670, 3626, 5910, 7842, 9162, 9822, 10108]
...
PROG
(Python)
from sympy import binomial
from sympy.utilities.iterables import partitions
from sympy.combinatorics.partitions import IntegerPartition
kinds = 4 - 1 # the number of part kinds - 1
def a382041_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( kinds + p[k], kinds)
if s > 0 :
t[s - 1] += fact
for i in range( n - 1):
t[i+1] += t[i]
return [0] + t
CROSSREFS
Main diagonal gives A023003.
Sequence in context: A058536 A371377 A154854 * A151672 A058493 A112149
KEYWORD
nonn,tabl
AUTHOR
Peter Dolland, Mar 12 2025
STATUS
approved