OFFSET
0,2
FORMULA
T(n, k) = Sum_{i=k..n} M(i), where the M(n)'s are the Motzkin numbers.
Recurrence: T(n+1, k+1) = T(n, k) + M(n+1) - M(k).
G.f. (M(x) - y*M(x*y))/((1 - x)*(1 - y)), where M(x) is the generating series for Motzkin numbers.
EXAMPLE
Triangle begins:
1
2, 1
4, 3, 2
8, 7, 6, 4
17, 16, 15, 13, 9
38, 37, 36, 34, 30, 21
89, 88, 87, 85, 81, 72, 51
216, 215, 214, 212, 208, 199, 178, 127
539, 538, 537, 535, 531, 522, 501, 450, 323
MATHEMATICA
M[n_] := If[n==0, 1, Coefficient[(1+x+x^2)^(n+1), x^n]/(n+1)]; Flatten[Table[Sum[M[i], {i, k, n}], {n, 0, 30}, {k, 0, n}]]
PROG
(Maxima) M(n):=coeff(expand((1+x+x^2)^(n+1)), x^n)/(n+1);
create_list(sum(M(i), i, k, n), n, 0, 6, k, 0, n);
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emanuele Munarini, Apr 06 2012
STATUS
approved