login
A088455
Triangle T(n,k) of number of integer sequences [y(1),...,y(n)] such that |y(i)-y(i+1)|<=1, 1=y(1)<=y(i)<=k=y(n).
0
1, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 4, 3, 1, 0, 1, 8, 8, 4, 1, 0, 1, 16, 20, 13, 5, 1, 0, 1, 32, 49, 38, 19, 6, 1, 0, 1, 64, 119, 106, 63, 26, 7, 1, 0, 1, 128, 288, 288, 195, 96, 34, 8, 1, 0, 1, 256, 696, 771, 579, 325, 138, 43, 9, 1, 0, 1, 512, 1681, 2046, 1675, 1042, 506, 190, 53
OFFSET
0,9
FORMULA
G.f. for column k: x^k/p(k) where p(0)=1, p(1)=1-x, p(n)=(1-x)p(n-1)-(x^2)p(n-2).
EXAMPLE
Rows from n=0: {1}; {0,1}; {0,1,1}; {0,1,2,1}; {0,1,4,3,1}; ...
[1,1,1,2],[1,1,2,2],[1,2,1,2],[1,2,2,2] are the T(4,2)=4 sequences.
PROG
(PARI) T(n, k)=local(p0, p1, p2); if(k<0 || k>n, 0, p1=1; for(i=1, k, p2=(1-x)*p1-x^2*p0; p0=p1; p1=p2); polcoeff(x^k/p1+x*O(x^n), n))
CROSSREFS
Sequence in context: A058716 A048723 A364386 * A361390 A369326 A369324
KEYWORD
nonn,tabl
AUTHOR
Michael Somos, Oct 01 2003
STATUS
approved