OFFSET
0,8
COMMENTS
For n >= 2, T(n,k)= number of nonnegative integer strings s(0),...,s(n) such that s(n)=n-k, s(0)=s(1)=1, |s(i)-s(i-1)|<=1 for i >= 2.
FORMULA
T(i, 0)=1 for i >= 0, T(2, 1)=1, T(2, 2)=1, T(3, 1)=2, T(3, 2)=3, T(3, 3)=2; and for i >= 4, T(i, 1)=i-1, T(i, i)=T(i-1, i-2)+T(i-1, i-1) and T(i, j)=T(i-1, j-2)+T(i-1, j-1)+T(i-1, j) for j=2, 3, ...., i-1.
Right-hand columns have g.f. (1-z)*M^k, where M is g.f. of Motzkin numbers (A001006).
EXAMPLE
1
1,1
1,1,1
1,2,3,2
1,3,6,7,5
1,4,10,16,18,12
1,5,15,30,44,46,30
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
EXTENSIONS
Edited by Ralf Stephan, Dec 18 2004
a(65) corrected and more terms from Sean A. Irvine, Sep 16 2019
Offset set to 0 by Alois P. Heinz, Sep 16 2019
STATUS
approved