|
|
A026120
|
|
Triangle T by rows: second differences of Motzkin triangle (A026300), (i >= -1, -1<=j<=i).
|
|
22
|
|
|
1, 1, 0, 1, 1, 0, 1, 1, 2, 1, 1, 2, 4, 4, 3, 1, 3, 7, 10, 11, 7, 1, 4, 11, 20, 28, 28, 18, 1, 5, 16, 35, 59, 76, 74, 46, 1, 6, 22, 56, 110, 170, 209, 196, 120, 1, 7, 29, 84, 188, 336, 489, 575, 525, 316, 1, 8, 37, 120, 301, 608, 1013, 1400, 1589, 1416, 841, 1, 9, 46, 165, 458, 1029, 1922, 3021, 4002, 4405, 3846, 2257
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
-1,9
|
|
COMMENTS
|
For n >= 2, T(n,k) = number of nonnegative integer strings s(0),...,s(n) such that s(0)=1, s(n)=n-k, |s(1)-1|=1, |s(i)-s(i-1)|<=1 for i >= 2.
|
|
LINKS
|
|
|
FORMULA
|
T(i, 0)=1 for i >= -1; T(0, 1)=0; T(1, 1)=1, T(1, 2)=0; for i >= 2, T(i, 1)=i-1, T(i, i+1)=T(i-1, i-1)+T(i-1, i), T(i, j)=T(i-1, j-2)+T(i-1, j-1)+T(i-1, j) for j=2, 3, ...., i.
G.f. of right-hand columns is (1-z)^2*M^k, with M the g.f. of the Motzkin numbers (A001006).
|
|
EXAMPLE
|
1;
1,0;
1,1,0;
1,1,2,1;
1,2,4,4,3;
1,3,7,10,11,7;
...
|
|
PROG
|
(PARI) T(i, j)=if(j<0||j>i+1, 0, if(j==0, 1, if(j==1, if(i>1, i-1, i>0), if(i+1==j, if(i==1, 0, T(i-1, i-1)+T(i-1, i)), T(i-1, j-2)+T(i-1, j-1)+T(i-1, j))))) \\ Ralf Stephan
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|