OFFSET
0,5
COMMENTS
Row Sums are:
{1, 2, 5, 8, 71, 278, 2996, 17396, 192239, 1426688, 16371611,...}
FORMULA
q=3;
t(n,m,q)=If[m == 0 Or m == n, 1, If[Floor[n/2] greater than or equal to m, StirlingS2[ n, m]*q^m, StirlingS2[n, n - m]*q^(n - m)]]
EXAMPLE
{1},
{1, 1},
{1, 3, 1},
{1, 3, 3, 1},
{1, 3, 63, 3, 1},
{1, 3, 135, 135, 3, 1},
{1, 3, 279, 2430, 279, 3, 1},
{1, 3, 567, 8127, 8127, 567, 3, 1},
{1, 3, 1143, 26082, 137781, 26082, 1143, 3, 1},
{1, 3, 2295, 81675, 629370, 629370, 81675, 2295, 3, 1},
{1, 3, 4599, 251910, 2762505, 10333575, 2762505, 251910, 4599, 3, 1}
MATHEMATICA
t[n_, m_, q_] = If[m == 0 || m == n, 1, If[Floor[n/2] >= m, StirlingS2[n, m]*q^ m, StirlingS2[n, n - m]*q^(n - m)]];
Table[Flatten[Table[Table[t[n, m, q], {m, 0, n}], {n, 0, 10}]], {q, 1, 10}]
CROSSREFS
KEYWORD
AUTHOR
Roger L. Bagula, Mar 22 2010
STATUS
approved