OFFSET
0,3
FORMULA
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
KEYWORD
nonn,tabl
AUTHOR
Peter Dolland, Apr 24 2025
STATUS
approved
