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.

Showing 1-4 of 4 results.

A175934 Number of lattice paths from (0,0) to (n,n) using steps S={(1,0),(0,1),(r,r)|0

Original entry on oeis.org

1, 2, 7, 27, 116, 532, 2554, 12675, 64507, 334836, 1765833, 9434779, 50962640, 277839361, 1526834471, 8448751385, 47035469902, 263260232668, 1480527858436, 8361881707770, 47409359120684, 269736194796537, 1539547726712437, 8812663513352489, 50579825742416942, 291012706492224315, 1678146650028389023
Offset: 0

Views

Author

Eric Werley, Dec 06 2010

Keywords

Comments

Number of lattice paths of weight n that start in (0,0), end on the horizontal axis, never go below this axis, whose steps are of the following four kinds: h=(1,0) of weight 1, H=(1,0) of weight 2, u=(1,1) of weight 1, and d=(1,-1) of weight 0; the weight of a path is the sum of the weights of its steps. Example: a(2)=7 because we have hh, H, hud, udh, udud, uhd, and uudd. - Emeric Deutsch, Sep 09 2014

Examples

			a(2)=7 because we can reach (2,2) in the following ways:
(1,0),(1,0),(0,1),(0,1);
(1,0),(0,1),(1,0),(0,1);
(1,0),(0,1),(1,1);
(1,0),(1,1),(0,1);
(1,1),(1,0),(0,1);
(1,1),(1,1);
(2,2).
G.f. = 1 + 2*x + 7*x^2 + 27*x^3 + 116*x^4 + 532*x^5 + 2554*x^6 + ...
		

Crossrefs

Programs

  • Maxima
    a(n):=if n<2 then n+1 else sum((binomial(2*k,k)*sum(binomial(k+1,j)*sum(3^(j-i)*binomial(j,i)*binomial(k-j+1,n-3*k+2*j-i-2)*(2)^(-n+2*(k-j)+1)*(-1)^(k-j+1),i,0,n-k),j,0,k+1))/(k+1),k,0,n); /* Vladimir Kruchinin, Mar 01 2016 */
  • Sage
    n=20
    M=[]
    for posx in range(0,n+1):
            for posy in range(0,n+1):
                if posx==0:
                    if posy==0:
                        M.append([1])
                    else:
                        M.append([0])
                else:
                    if posy==0:
                        M[0].append(0)
                        M[0][posx]=M[0][posx]+M[0][posx-1]
                    else:
                        if posy>posx:
                            M[posy].append(0)
                        else:
                            M[posy].append(0)
                            M[posy][posx]=M[posy][posx-1]+M[posy][posx]
                            M[posy][posx]=M[posy-1][posx]+M[posy][posx]
                            for r in range(1,min(posx,posy,2)+1):
                                M[posy][posx]=M[posy-r][posx-r]+M[posy][posx]
    L=[]
    for k in range(0,n+1):
        L.append(M[k][k])
    print(L)
    

Formula

G.f.: (1 - x - x^2 - sqrt(x^4 + 2*x^3 - x^2 - 6*x + 1))/(2*x). - Mark van Hoeij, Apr 16 2013
G.f.: 1/(1 - x*(1 + x + 1/(1 - x*(1 + x + 1/...)))). - Michael Somos, Mar 30 2014
G.f. g = g(x) satisfies g = 1 + x*g + x^2*g + x*g^2. - Emeric Deutsch, Sep 09 2014
a(n) = Sum_{k=0..n} ((C(k)*Sum_{j=0..k+1} (binomial(k+1,j)*Sum_{i=0..n-k} (3^(j-i)*binomial(j,i)*binomial(k-j+1,n-3*k+2*j-i-2)*2^(2*(k-j)-n+1)*(-1)^(k-j+1))))), a(0)=1, a(1)=2, where C(k) = A000108(k). - Vladimir Kruchinin, Mar 01 2016
a(0) = 1, a(1) = 2; a(n) = 2 * a(n-1) + 3 * a(n-2) + Sum_{k=2..n-1} a(k) * a(n-k-1). - Ilya Gutkovskiy, Jul 20 2021
G.f.: 1/G(0), where G(k) = 1 - (2*x+x^2)/(1-x/G(k+1)) (continued fraction). - Nikolaos Pantelidis, Jan 08 2023

A175939 Number of lattice paths from (0,0) to (n,n) using steps S={(k,0),(0,k),(r,r)|k>0,0

Original entry on oeis.org

1, 2, 10, 62, 448, 3495, 28640, 242946, 2114829, 18783658, 169546150, 1550728135, 14340859992, 133867779775, 1259689173181, 11936488052113, 113799596287017, 1090803942244627, 10505978544362607, 101623141479156708, 986801698075230291
Offset: 0

Views

Author

Eric Werley, Dec 06 2010

Keywords

References

  • J. P. S. Kung and A. de Mier, Catalan lattice paths with rook, bishop and spider steps, Journal of Combinatorial Theory, Series A 120 (2013) 379-389. - From N. J. A. Sloane, Dec 27 2012

Crossrefs

Programs

  • Mathematica
    Flatten[{1,RecurrenceTable[{(n+2)*a[n]+(3*n+7)*a[n+1]-(5*n+24)*a[n+2]-(19*n+90)*a[n+3]+(n+3)*a[n+4]+(21*n+116)*a[n+5]-2*(n+7)*a[n+6]==0, a[1]==2, a[2]==10, a[3]==62, a[4]==448, a[5]==3495, a[6]==28640},a,{n,20}]}] (* Vaclav Kotesovec, Sep 07 2012 *)

Formula

a(n) ~ b*c^n/n^(3/2), where c = 10.458904071481665... is the root of the equation x^4-10*x^3-5*x^2+2*x+1=0 and b = sqrt(2*(1-5*c-15*c^2+2*c^3) /c^3)*(-5 - 4*c + 21*c^2 + 27*c^3) / (44*c^3*sqrt(Pi)) = 0.3791408579... - Vaclav Kotesovec, Aug 10 2013
G.f.: ((x^4+2*x^3-5*x^2-10*x+1)^(1/2)-x^2-3*x-1)/(2*x*(x-1)*(x+2)^2). - Mark van Hoeij, Apr 16 2013

Extensions

Minor edits Vaclav Kotesovec, Mar 31 2014

A175936 Number of lattice walks from (0,0) to (n,n) using steps S={(k,0),(0,k),(r,r)|0

Original entry on oeis.org

1, 2, 10, 62, 433, 3262, 25784, 210892, 1769793, 15152252, 131826824, 1162114368, 10357863128, 93183955872, 845064072102, 7717150002692, 70903816529979, 654967192303546, 6079243786794502, 56668633625876866, 530291242720187193
Offset: 0

Views

Author

Eric Werley, Dec 06 2010

Keywords

Crossrefs

A175937 Number of lattice paths from (0,0) to (n,n) using steps S={(k,0),(0,k),(r,r)|0

Original entry on oeis.org

1, 2, 10, 62, 448, 3464, 28111, 236022, 2033145, 17867442, 159558635, 1443747386, 13207922431, 121962046864, 1135246916024, 10640772522150, 100346005711723, 951400275042466, 9063703952844960, 86718277215053218, 832901296331740527
Offset: 0

Views

Author

Eric Werley, Dec 06 2010

Keywords

Crossrefs

Showing 1-4 of 4 results.