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.

A225041 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), H=(1,0) and S=(0,1).

Original entry on oeis.org

1, 1, 3, 9, 35, 145, 659, 3137, 15619, 80177, 422595, 2273633, 12447667, 69138193, 388784259, 2209440945, 12671782579, 73260414481, 426545078627, 2499059841249, 14723542302627, 87181150961361, 518554078448339, 3097007445391441, 18565515801339827
Offset: 0

Views

Author

Alois P. Heinz, Apr 25 2013

Keywords

Examples

			a(0) = 1: the empty path.
a(1) = 1: H.
a(2) = 3: HH, UD, HSD.
a(3) = 9: HHH, UDH, HSDH, UHD, HSHD, HUD, HHSD, UDSD, HSDSD.
		

Crossrefs

Cf. A001006 (without S-steps), A114296 (without U-steps), A198324 (without H-steps), A225042 (paths to (n,n)), A286760.

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, 0):
    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, 0];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Mar 29 2017, translated from Maple *)

Formula

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

A224769 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) and S=(0,1).

Original entry on oeis.org

1, 1, 2, 7, 33, 184, 1142, 7629, 53750, 394157, 2981546, 23117242, 182867360, 1470714606, 11993628444, 98967634147, 824958769631, 6937180941468, 58785077008641, 501520244718945, 4304433733010962, 37142428443486254, 322042675618484973, 2804409601249038670
Offset: 0

Views

Author

Alois P. Heinz, Apr 17 2013

Keywords

Examples

			a(2) = 2: UDSS, UU.
a(3) = 7: UDSDSSS, UDUSS, UDSSDSS, UUDSS, UDSUS, UDSSU, UUU.
		

Crossrefs

Cf. A198324 (paths to (n,0)), A225042 (with additional H-steps), A286425.

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, n):
    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, n];
    a /@ Range[0, 30] (* Jean-François Alcover, Dec 18 2020, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n / n^(3/2), where d = 3/4*(71 + 8*sqrt(2))^(1/3) + 51/(4*(71 + 8*sqrt(2))^(1/3)) + 13/4 = 9.4435356015932520820011..., c = 0.00814413508604516738631686716788556507884786... . - Vaclav Kotesovec, Sep 07 2014

A286427 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) and S=(0,1).

Original entry on oeis.org

1, 0, 3, 5, 24, 78, 325, 1272, 5373, 22572, 97762, 425716, 1882062, 8375064, 37601643, 169773435, 771096972, 3518065767, 16119884297, 74125225732, 341970676466, 1582133854847, 7338641255894, 34117910537671, 158946919835352, 741884929970516, 3468677541274922
Offset: 0

Views

Author

Alois P. Heinz, May 14 2017

Keywords

Crossrefs

Cf. A198324.

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, 0)[2]:
    seq(a(n), n=0..30);

Formula

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