OFFSET
0,4
COMMENTS
G.f. A(x,y) satisfies 0 = -(1-x)^2 + (1-x)(1-4x+3xy)A + 2x(1-2x-2y+3xy)A^2. G.f.: (1-x)(-(1-4x+3xy) + sqrt((1-xy)(1-9xy)))/(4x(1-2x-2y+3xy)) = 2(1-x)/(1-4x+3xy+sqrt((1-xy)(1-9xy))). - Michael Somos, Mar 06 2004
T(n,k) = number of below-diagonal lattice paths from (0,0) to (n,k) consisting of steps (k,0) (k=1,2,...) and (0,k) (k=1,2,...). Example: T(2,1)=3 because we have (1,0)(1,0)(0,1), (2,0)(0,1) and (1,0)(0,1)(1,0). - Emeric Deutsch, Mar 19 2004
T(n,k) is odd if and only if (n,k) = (0,0), k = n > 0, or k + 1 = n > 0. - Peter Kagey, Apr 20 2020
REFERENCES
Wen-jin Woan, Diagonal lattice paths, Congressus Numerantium, 151, 2001, 173-178.
LINKS
Peter Kagey, Table of n, a(n) for n = 0..10011 (141 rows flattened, first 50 rows from G. C. Greubel)
C. Coker, Enumerating a class of lattice paths, Discrete Math., 271 (2003), 13-28.
EXAMPLE
1;
1, 1;
2, 3, 5;
4, 8, 17, 29;
8, 20, 50, 107, 185;
MAPLE
l := 1:a[0, 0] := 1:b[l] := 1:T := (n, k)->sum(a[n, j], j=0..k-1)+sum(a[n-j, k], j=1..n-k): for n from 1 to 15 do for k from 0 to n do a[n, k] := T(n, k):l := l+1:b[l] := a[n, k]: od:od:seq(b[w], w=1..l); # Sascha Kurz
# alternative
A059450 := proc(n, k)
option remember;
local j ;
if k =0 and n= 0 then
1;
elif k > n or k < 0 then
0 ;
else
add( procname(n, j), j=0..k-1) + add(procname(n-j, k), j=1..n-k) ;
end if;
end proc:
seq(seq(A059450(n, k), k=0..n), n=0..12) ; # R. J. Mathar, Mar 25 2024
MATHEMATICA
t[0, 0] = 1; t[n_, k_] /; k > n = 0; t[n_, k_] := t[n, k] = Sum[t[n, j], {j, 0, k-1}] + Sum[t[n-j, k], {j, 1, n-k}]; Table[t[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jan 08 2014 *)
PROG
(PARI) T(n, k)=if(k<0||k>n, 0, polcoeff(polcoeff(2*(1-x)/((1-4*x+3*x*y)+sqrt((1-x*y)*(1-9*x*y)+x^2*O(x^n))), n), k)) /* Michael Somos, Mar 06 2004 */
(PARI) T(n, k)=local(A, t); if(k<0||k>n, 0, A=matrix(n+1, n+1); A[1, 1]=1; for(m=1, n, t=0; for(j=0, m, t+=(A[m+1, j+1]=t+sum(i=1, m-j, A[m-i+1, j+1])))); A[n+1, k+1]) /* Michael Somos, Mar 06 2004 */
(PARI) T(n, k)=if(k<0||k>n, 0, (n==0)+sum(j=0, k-1, T(n, j))+sum(j=1, n-k, T(n-j, k))) /* Michael Somos, Mar 06 2004 */
CROSSREFS
KEYWORD
AUTHOR
N. J. A. Sloane, Sep 16 2003
EXTENSIONS
More terms from Ray Chandler, Sep 17 2003
STATUS
approved