OFFSET
0,5
COMMENTS
Row sums are:
{1, 2, 7, 36, 198, 1260, 9180, 75600, 695520, 7076160, 78926400,...}.
The m=0 of the general sequence is A008518.
FORMULA
m=3;
t0(n,k)=If[n*k == 0, 1, Sum[(-1)^j Binomial[n + 1, j](k + 1 - j)^n, {j, 0, k + 1}]];
t(n,k,m)=If[n == 0, 1, ( m*(n - k) + 1)*t0(n - 1 + 1, k - 1) +
(m*k + 1)*t0(n - 1 + 1, k) +
m*k*(n - k)*t0(n - 2 + 1, k - 1)].
EXAMPLE
{1},
{1, 1},
{1, 5, 1},
{1, 17, 17, 1},
{1, 45, 106, 45, 1},
{1, 105, 524, 524, 105, 1},
{1, 229, 2231, 4258, 2231, 229, 1},
{1, 481, 8547, 28771, 28771, 8547, 481, 1},
{1, 989, 30424, 171283, 290126, 171283, 30424, 989, 1},
{1, 2009, 102926, 928070, 2505074, 2505074, 928070, 102926, 2009, 1},
{1, 4053, 336109, 4684096, 19330402, 30217078, 19330402, 4684096, 336109, 4053, 1}
MATHEMATICA
Clear[t, n, k, m];
t[n_, k_, m_] = (m*(n - k) + 1)*Binomial[n - 1, k - 1] + (m*k + 1)*Binomial[n - 1, k] - m*k*(n - k)*Binomial[n - 2, k - 1];
Table[t[n, k, m], {m, 0, 10}, {n, 0, 10}, {k, 0, n}];
Table[Flatten[Table[Table[t[n, k, m], {k, 0, n}], {n, 0, 10}]], {m, 0, 10}]
Table[Table[Sum[t[n, k, m], {k, 0, n}], {n, 0, 10}], {m, 0, 10}];
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula and Gary W. Adamson, Feb 24 2009
STATUS
approved