login
Triangle T by rows: second differences of Motzkin triangle (A026300), (i >= -1, -1<=j<=i).
22

%I #17 Sep 17 2019 03:50:09

%S 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,

%T 16,35,59,76,74,46,1,6,22,56,110,170,209,196,120,1,7,29,84,188,336,

%U 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

%N Triangle T by rows: second differences of Motzkin triangle (A026300), (i >= -1, -1<=j<=i).

%C 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.

%F T(n, k) = A026105(n+1, k+1) - A026105(n, k), T(0, 0) = 0.

%F 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.

%F G.f. of right-hand columns is (1-z)^2*M^k, with M the g.f. of the Motzkin numbers (A001006).

%e 1;

%e 1,0;

%e 1,1,0;

%e 1,1,2,1;

%e 1,2,4,4,3;

%e 1,3,7,10,11,7;

%e ...

%o (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_

%Y Cf. Right-hand columns include A026107, A026122, A026123, A026124, A026125, A026126. Row sums are A026135. Central column is A026127.

%K nonn,tabl

%O -1,9

%A _Clark Kimberling_

%E Edited by _Ralf Stephan_, Dec 18 2004

%E a(26) corrected and more terms from _Sean A. Irvine_, Sep 17 2019