login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
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.
FORMULA
T(n, k) = A026105(n+1, k+1) - A026105(n, k), T(0, 0) = 0.
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
Cf. Right-hand columns include A026107, A026122, A026123, A026124, A026125, A026126. Row sums are A026135. Central column is A026127.
Sequence in context: A085143 A321029 A253473 * A108746 A333270 A333272
KEYWORD
nonn,tabl
EXTENSIONS
Edited by Ralf Stephan, Dec 18 2004
a(26) corrected and more terms from Sean A. Irvine, Sep 17 2019
STATUS
approved