cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A059450 Triangle read by rows: T(n,k) = Sum_{j=0..k-1} T(n,j) + Sum_{j=1..n-k} T(n-j,k), with T(0,0)=1 and T(n,k) = 0 for k > n.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 4, 8, 17, 29, 8, 20, 50, 107, 185, 16, 48, 136, 336, 721, 1257, 32, 112, 352, 968, 2370, 5091, 8925, 64, 256, 880, 2640, 7116, 17304, 37185, 65445, 128, 576, 2144, 6928, 20168, 53596, 129650, 278635, 491825, 256, 1280, 5120, 17664, 54880
Offset: 0

Views

Author

N. J. A. Sloane, Sep 16 2003

Keywords

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

Examples

			1;
1,  1;
2,  3,  5;
4,  8, 17,  29;
8, 20, 50, 107, 185;
		

References

  • Wen-jin Woan, Diagonal lattice paths, Congressus Numerantium, 151, 2001, 173-178.

Crossrefs

Columns include A000079, A001792 (I guess), A086866, A059231. Rows sums give A086871.
A059231(n) = T(n, n).

Programs

  • 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 *)
  • 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 */

Extensions

More terms from Ray Chandler, Sep 17 2003