OFFSET
0,3
COMMENTS
Row sums are:
{1, 3, 8, 17, 30, 48, 71, 100, 135, 177, 226, 283, 348,...}.
Example a(n,m) for q=10:
{1},
{1, 10},
{1, 1, 10},
{1, 1, 2, 10},
{1, 1, 1, 3, 10},
{1, 1, 1, 2, 4, 10},
{1, 1, 1, 1, 3, 5, 10},
{1, 1, 1, 1, 2, 4, 6, 10},
{1, 1, 1, 1, 1, 3, 5, 7, 10},
{1, 1, 1, 1, 1, 2, 4, 6, 8, 10},
{1, 1, 1, 1, 1, 1, 3, 5, 7, 9, 10}
FORMULA
a(n,m)=Floor[(a(n - 1, m - 1) + a(n - 1, m))/2] with limit q:
t(n,q)=Sum(a(n,m),{m,0,q}]
EXAMPLE
{1},
{1, 2},
{1, 3, 4},
{1, 4, 5, 7},
{1, 5, 6, 8, 10},
{1, 6, 7, 9, 11, 14},
{1, 7, 8, 10, 12, 15, 18},
{1, 8, 9, 11, 13, 16, 19, 23},
{1, 9, 10, 12, 14, 17, 20, 24, 28},
{1, 10, 11, 13, 15, 18, 21, 25, 29, 34},
{1, 11, 12, 14, 16, 19, 22, 26, 30, 35, 40},
{1, 12, 13, 15, 17, 20, 23, 27, 31, 36, 41, 47},
{1, 13, 14, 16, 18, 21, 24, 28, 32, 37, 42, 48, 54}
MATHEMATICA
Clear[a, n, m, N0];
N0 = q;
a[0, 0] := 1; a[1, 0] := 1; a[1, 1] = N0;
a[n_, 0] := 1; a[n_, n_] := N0;
a[n_, m_] := a[n, m] = Floor[(a[n - 1, m - 1] + a[n - 1, m])/2]
Table[Table[Sum[a[n, m], {m, 0, n}], {n, 0, q}], {q, 0, 12}];
Flatten[%]
CROSSREFS
KEYWORD
AUTHOR
Roger L. Bagula, Mar 30 2010
STATUS
approved