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-3 of 3 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

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

A286425 Total number of nodes summed over all 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) and S=(0,1).

Original entry on oeis.org

1, 2, 8, 44, 285, 2028, 15338, 120960, 983108, 8172094, 69116592, 592590616, 5136777504, 44928712804, 395907022448, 3510622573064, 31296093794827, 280275392413204, 2520017580255461, 22736733105613548, 205767848345966976, 1867240544055742660
Offset: 0

Views

Author

Alois P. Heinz, May 14 2017

Keywords

Crossrefs

Cf. A224769.

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, y-1)+b(x-1, y-1)+b(x-1, y+1))))
        end:
    a:= n-> b(n$2)[2]:
    seq(a(n), n=0..30);

Formula

a(n) ~ c * d^n / sqrt(n), where d = (3*(71 + 8*sqrt(2))^(1/3))/4 + 51/(4*(71 + 8*sqrt(2))^(1/3)) + 13/4 = 9.443535601593252082001105527294087383986236797... and c = 0.0201623254316291127574085659620180015446126055020315052104102916... - Vaclav Kotesovec, Sep 11 2021
Showing 1-3 of 3 results.