OFFSET
0,5
COMMENTS
row sums (n+1)!:
{1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800, 39916800,...}
FORMULA
row(n)=(n+1)!: f(n,m)=Floor[(m/n)*row(n)].
EXAMPLE
{1},
{1, 1},
{1, 4, 1},
{1, 11, 11, 1},
{1, 15, 88, 15, 1},
{1, 72, 287, 287, 72, 1},
{1, 420, 840, 2518, 840, 420, 1},
{1, 2880, 5760, 11519, 11519, 5760, 2880, 1},
{1, 22680, 45360, 68040, 90718, 68040, 45360, 22680, 1},
{1, 201600, 403200, 604800, 604799, 604799, 604800, 403200, 201600, 1},
{1, 1995840, 3991680, 5987520, 7983360, -2, 7983360, 5987520, 3991680, 1995840, 1}
MATHEMATICA
Clear[v, n, row, f]; row[n_] = (n+1);
f[n_, m_] = Floor[(m/n)*row[n]/2]; v[0] = {1}; v[1] = {1, 1};
v[n_] := v[n] = If[Mod[n, 2] == 0, Join[{1}, Table[ f[n, m], {m, 1, Floor[ n/2] - 1}], {row[n] - 2*Sum[ f[n, m], {m, 1, Floor[n/2] - 1}] - 2}, Table[ f[n, m], {m, Floor[n/ 2] - 1, 1, -1}], { 1}],
Join[{1}, Table[ f[n, m], {m, 1, Floor[n/2] - 1}], {row[n]/2 - Sum[ f[n, m], { m, 1, Floor[n/2] - 1}] - 1, row[n]/ 2 - Sum[ f[n, m], {m, 1, Floor[ n/2] - 1}] - 1}, Table[ f[n, m], {m, Floor[n/ 2] - 1, 1, -1}], {1}]];
Table[v[n], {n, 0, 10}]; Flatten[%]
CROSSREFS
KEYWORD
AUTHOR
Roger L. Bagula, Dec 16 2008
STATUS
approved