OFFSET
0,4
FORMULA
EXAMPLE
Triangle T(n, k) starts:
[0] 1;
[1] -1, 1;
[2] 3, -1, 2;
[3] -1, 7, 0, 6;
[4] 27, 11, 26, 12, 24;
[5] 119, 151, 120, 150, 120, 120;
[6] 1203, 1139, 1202, 1140, 1200, 1080, 720;
[7] 11759, 11887, 11760, 11886, 11760, 11760, 10080, 5040;
[8] 136587, 136331, 136586, 136332, 136584, 136080, 131040, 100800, 40320;
PROG
(PARI) T(n, k) = sum(m=0, n, ((-1)^((k > 0)+m+n)*binomial(n, m)*(2^(n-m)-(k > 0))*sum(h=max(k-1, 0), m, h!*stirling(m, h, 2))))
CROSSREFS
KEYWORD
AUTHOR
Thomas Scheuerle, Apr 26 2024
STATUS
approved