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.

A225042 Number of lattice paths from (0,0) to (n,n) that do not go below the x-axis or above the diagonal x=y and consist of steps U=(1,1), D=(1,-1), H=(1,0) and S=(0,1).

Original entry on oeis.org

1, 2, 8, 48, 360, 3088, 28928, 288208, 3003952, 32402384, 359019952, 4064452272, 46829600704, 547498996736, 6480275672192, 77511461858592, 935562094075392, 11381614588917296, 139425068741674448, 1718444636265140992, 21295889048851102176, 265200380258393530896
Offset: 0

Views

Author

Alois P. Heinz, Apr 25 2013

Keywords

Examples

			a(0) = 1: the empty path.
a(1) = 2: U, HS.
a(2) = 8: UU, HSU, UHS, HSHS, HUS, HHSS, UDSS, HSDSS.
		

Crossrefs

Cf. A006318 (without D-steps), A224769 (without H-steps), A224776 (without U-steps), A225041 (paths to (n,0)), A286765.

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(y>x, 0, `if`(x=0, 1,
           b(x-1, y)+`if`(y>0, b(x-1, y-1)+b(x, y-1), 0)+b(x-1, y+1)))
        end:
    a:= n-> b(n, n):
    seq(a(n), n=0..25);
  • Mathematica
    b[x_, y_] := b[x, y] = If[y > x, 0, If[x == 0, 1, b[x - 1, y] + If[y > 0, b[x - 1, y - 1] + b[x, y - 1], 0] + b[x - 1, y + 1]]];
    a[n_] := b[n, n];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Mar 29 2017, translated from Maple *)

Formula

a(n) ~ c * d^n / n^(3/2), where d = 1/6*(19009+153*sqrt(17))^(1/3) + 356/(3*(19009+153*sqrt(17))^(1/3)) + 14/3 = 13.56165398271839628518..., c = 0.03237684690282108810066870410351693504744294274892020985727414558915214336... - Vaclav Kotesovec, Sep 07 2014, updated Sep 13 2021

A114296 First row of Modified Schroeder numbers for q=3 (A114292).

Original entry on oeis.org

1, 1, 2, 5, 16, 57, 224, 934, 4092, 18581, 86888, 415856, 2029160, 10061161, 50568680, 257129888, 1320619176, 6842177174, 35722456976, 187772944964, 992991472328, 5279633960181, 28208037066528, 151373637844440, 815568695756496, 4410124252008112
Offset: 0

Views

Author

Christopher Hanusa (chanusa(AT)math.binghamton.edu), Nov 21 2005

Keywords

Comments

a(i) is the number of paths from (0,0) to (i,i) using steps of length (0,1), (1,0) and (1,1), not passing above the line y=x nor below the line y=x/2.

Examples

			The number of paths from (0,0) to (3,3) staying between the lines y=x and y=x/2 using steps of length (0,1), (1,0) and (1,1) is a(3)=5.
		

Crossrefs

Cf. A224776, A225041. - Alois P. Heinz, Apr 25 2013
Cf. A286761.

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(y>x or y b(n, n):
    seq(a(n), n=0..30);  # Alois P. Heinz, Apr 25 2013
  • Mathematica
    b[x_, y_] := b[x, y] = If[y>x || yJean-François Alcover, Feb 05 2015, after Alois P. Heinz *)

Formula

a(n) ~ c * (3+2*sqrt(2))^n / n^(3/2), where c = 0.02741316010407391604887680145773... . - Vaclav Kotesovec, Sep 07 2014

Extensions

Corrected by Philippe Deléham, Sep 04 2006
Extended beyond a(10) by Alois P. Heinz, Apr 25 2013

A198324 Number of lattice paths from (0,0) to (n,0) that do not go below the x-axis or above the diagonal x=y and consist of steps U=(1,1), D=(1,-1) and S=(0,1).

Original entry on oeis.org

1, 0, 1, 1, 4, 10, 35, 116, 427, 1584, 6146, 24216, 97754, 400080, 1662645, 6986127, 29669872, 127101015, 548839687, 2386211664, 10439207266, 45920497075, 203004397362, 901459381683, 4019351034816, 17987665701788, 80773320086286, 363842478143834
Offset: 0

Views

Author

Alois P. Heinz, Apr 18 2013

Keywords

Examples

			a(4) = 4: UDSDSD, UDUD, UDSSDD, UUDD.
a(5) = 10: UDSDSDSD, UDUDSD, UDSSDDSD, UUDDSD, UDSDUD, UDSDSSDD, UDUSDD, UDSSDSDD, UUDSDD, UDSUDD.
		

Crossrefs

Cf. A000108 (without S-steps), A224769 (paths to (n,n)), A225041 (with additional H-steps), A286427.

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(y>x, 0, `if`(x=0, 1,
          `if`(y>0, b(x, y-1)+b(x-1, y-1), 0)+b(x-1, y+1)))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..30);
  • Mathematica
    b[x_, y_] := b[x, y] = If[y>x, 0, If[x == 0, 1, If[y>0, b[x, y-1] + b[x-1, y-1], 0] + b[x-1, y+1]]]; a[n_] := b[n, 0]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 05 2015, after Alois P. Heinz *)

Formula

a(n) ~ c * (2*(1+sqrt(2)))^n / n^(3/2), where c = 0.01202323187423280845930143205554758... . - Vaclav Kotesovec, Sep 07 2014

A286760 Total number of nodes summed over all lattice paths from (0,0) to (n,0) that do not go below the x-axis or above the diagonal x=y and consist of steps U=(1,1), D=(1,-1), H=(1,0) and S=(0,1).

Original entry on oeis.org

1, 2, 10, 42, 214, 1098, 5978, 33190, 189078, 1093490, 6414714, 38027030, 227489950, 1370980490, 8314674202, 50696630838, 310541818382, 1909850054666, 11786947172234, 72969941803662, 452976340653030, 2818815920369754, 17579546535174946, 109850944544149134
Offset: 0

Views

Author

Alois P. Heinz, May 14 2017

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(y<0 or y>x, 0, `if`(x=0, [1$2],
          (p-> p+[0, p[1]])(b(x-1, y)+b(x, y-1)+b(x-1, y-1)+b(x-1, y+1))))
        end:
    a:= n-> b(n, 0)[2]:
    seq(a(n), n=0..30);
  • Mathematica
    b[x_, y_] := b[x, y] = If[y<0 || y>x, 0, If[x == 0, {1, 1}, Function[
       p, p+{0, p[[1]]}][b[x-1, y] + b[x, y-1] + b[x-1, y-1] + b[x-1, y+1]]]];
    a[n_] := b[n, 0][[2]];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 28 2022, after Alois P. Heinz *)

Formula

a(n) ~ c * (3 + 2*sqrt(3))^n / sqrt(n), where c = 0.0889843039487036085233000284915570190371055498671732340656... - Vaclav Kotesovec, Sep 11 2021
Showing 1-4 of 4 results.