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-6 of 6 results.

A333069 Number of lattice paths from (0,0) to (n,0) that do not go below the x-axis, and at (x,y) only allow steps (1,v) with v in {-1,0,1,...,y+1}.

Original entry on oeis.org

1, 1, 2, 4, 9, 22, 57, 155, 439, 1287, 3886, 12035, 38100, 122943, 403410, 1343321, 4531710, 15465414, 53325680, 185575269, 651191826, 2302247822, 8194892393, 29350405663, 105713021575, 382717065800, 1392121894189, 5085836001166, 18654616951435, 68678029247822
Offset: 0

Views

Author

Alois P. Heinz, Mar 06 2020

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(x=0, 1, add(
         `if`(x+j>y, b(x-1, y-j), 0), j=-1-y..min(1, y)))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..33);
  • Mathematica
    b[x_, y_] := b[x, y] = If[x == 0, 1, Sum[If[x + j > y, b[x - 1, y - j], 0], {j, -1 - y, Min[1, y]}]];
    a[n_] := b[n, 0];
    a /@ Range[0, 33] (* Jean-François Alcover, Dec 19 2020, after Alois P. Heinz *)

Formula

a(n) = A196161(n) for n = 1..8.
a(n) ~ c * 4^n / n^(3/2), where c = 0.0131789402414023971902275212293294628834887666310830183578424168829... - Vaclav Kotesovec, Mar 25 2020

A333608 Sum of the heights of all nonnegative lattice paths from (0,0) to (n,0) where the allowed steps at (x,y) are (1,v) with v in {-1,0,...,max(y,1)}.

Original entry on oeis.org

0, 0, 1, 3, 9, 25, 70, 200, 584, 1742, 5304, 16471, 52120, 167885, 549856, 1828897, 6170108, 21087458, 72923515, 254880303, 899454849, 3201729220, 11486266036, 41497996004, 150879471934, 551723923040, 2027990653855, 7489507917594, 27777837416779, 103427750936183
Offset: 0

Views

Author

Alois P. Heinz, Mar 28 2020

Keywords

Comments

The maximal height in all paths of length n is A103354(n-1).

Crossrefs

Programs

  • Maple
    b:= proc(x, y, h) option remember;
         `if`(x=0, h, add(b(x-1, y+j, max(y, h)),
          j=-min(1, y)..min(max(1, y), x-y-1)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..29);
  • Mathematica
    b[x_, y_, h_] := b[x, y, h] = If[x == 0, h, Sum[b[x - 1, y + j, Max[y, h]], {j, -Min[1, y], Min[Max[1, y], x - y - 1]}]];
    a[n_] := b[n, 0, 0];
    a /@ Range[0, 29] (* Jean-François Alcover, May 12 2020, after Maple *)

A333106 Total number of nodes summed over all nonnegative lattice paths from (0,0) to (n,0) where the allowed steps at (x,y) are (1,v) with v in {-1,0,...,max(y,1)}.

Original entry on oeis.org

1, 2, 6, 16, 45, 126, 357, 1024, 2979, 8800, 26422, 80688, 250705, 792568, 2548620, 8331568, 27667109, 93241152, 318569656, 1102246040, 3857916552, 13644697000, 48716177272, 175417870080, 636493447625, 2325399611652, 8548381939932, 31599848465276
Offset: 0

Views

Author

Alois P. Heinz, Mar 07 2020

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(x=0, 1, add(
          b(x-1, y+j), j=-min(1, y)..min(max(1, y), x-y-1)))
        end:
    a:= n-> (n+1)*b(n, 0):
    seq(a(n), n=0..29);
  • Mathematica
    b[x_, y_] := b[x, y] = If[x == 0, 1,
         Sum[b[x-1, y+j], {j, -Min[1, y], Min[Max[1, y], x-y-1]}]];
    a[n_] := (n+1) b[n, 0];
    a /@ Range[0, 29] (* Jean-François Alcover, Apr 05 2021, after Alois P. Heinz *)

Formula

a(n) ~ c * 4^n / sqrt(n), where c = 0.0019335749177095597674777855613451543338378695415042866523284... - Vaclav Kotesovec, Oct 24 2021

A333107 Total area under all nonnegative lattice paths from (0,0) to (n,0) where the allowed steps at (x,y) are (1,v) with v in {-1,0,...,max(y,1)}.

Original entry on oeis.org

0, 0, 1, 4, 16, 56, 190, 637, 2131, 7156, 24215, 82758, 285991, 999715, 3534394, 12631420, 45601759, 166169360, 610650687, 2261234467, 8430749631, 31625520000, 119281312293, 452077280484, 1720796968459, 6575385383602, 25212139233077, 96970372087853
Offset: 0

Views

Author

Alois P. Heinz, Mar 07 2020

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(x=0, [1, 0], add(
          (p-> p+[0, p[1]*(y+j/2)])(b(x-1, y+j)),
           j=-min(1, y)..min(max(1, y), x-y-1)))
        end:
    a:= n-> b(n, 0)[2]:
    seq(a(n), n=0..29);
  • Mathematica
    b[x_, y_] := b[x, y] = If[x == 0, {1, 0}, Sum[
         Function[p, p + {0, p[[1]]*(y + j/2)}][b[x - 1, y + j]],
         {j, -Min[1, y], Min[Max[1, y], x - y - 1]}]];
    a[n_] :=  b[n, 0][[2]];
    a /@ Range[0, 29] (* Jean-François Alcover, Apr 05 2021, after Alois P. Heinz *)

A337067 Number of nonnegative lattice paths from (0,0) to (n,0) where the allowed steps at (x,y) are (h,v) with h in {1..max(1,y)} and v in {-1,0,1}.

Original entry on oeis.org

1, 1, 2, 4, 9, 22, 57, 156, 447, 1332, 4103, 12999, 42176, 139638, 470353, 1607861, 5566543, 19484810, 68859862, 245404650, 881081082, 3184214751, 11575346316, 42300703150, 155316289004, 572725968326, 2120154235114, 7876449597257, 29356608044002
Offset: 0

Views

Author

Alois P. Heinz, Oct 12 2020

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(x=0, 1, add(add(
          b(x-h, y-v), h=1..min(x-y+v, max(1, y-v))), v=-1..min(y, 1)))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..30);
  • Mathematica
    b[x_, y_] := b[x, y] = If[x == 0, 1, Sum[Sum[
        b[x-h, y-v], {h, 1, Min[x-y+v, Max[1, y-v]]}], {v, -1, Min[y, 1]}]];
    a[n_] := b[n, 0];
    a /@ Range[0, 30] (* Jean-François Alcover, Dec 22 2020, after Alois P. Heinz *)

Formula

a(n) ~ c * 4^n / n^(3/2), where c = 0.03828240225265266504281697555169550706277641504396262520878537702016362... - Vaclav Kotesovec, Oct 24 2020

A348202 Number of nonnegative lattice paths from (0,0) to (n,0) using steps in {(1,-4), (1,-1), (1,0), (1,1)}.

Original entry on oeis.org

1, 1, 2, 4, 9, 22, 57, 155, 435, 1249, 3645, 10770, 32143, 96747, 293359, 895373, 2748803, 8483035, 26302248, 81896176, 255967640, 802790415, 2525691721, 7968972542, 25209580699, 79942927651, 254077293876, 809192984902, 2582113984084, 8254273128869
Offset: 0

Views

Author

Alois P. Heinz, Oct 06 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(x, y) option remember; `if`(y<0 or y>x, 0,
         `if`(x=0, 1, add(b(x-1, y-j), j=[-4, -1, 0, 1])))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..31);
  • Mathematica
    b[x_, y_] := b[x, y] = If[y < 0 || y > x, 0, If[x == 0, 1, Sum[b[x - 1, y - j], {j, {-4, -1, 0, 1}}]]];
    a[n_] := b[n, 0];
    Table[a[n], {n, 0, 31}] (* Jean-François Alcover, Dec 28 2022, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n / n^(3/2), where d = 3.3640233336410979391691803264403704977... is the root of the equation 256*d^5 - 1280*d^4 + 960*d^3 + 2267*d^2 - 1324*d - 4112 = 0 and c = 0.710307351107763693658610320440791667652705027171696102847138... - Vaclav Kotesovec, Oct 24 2021
Showing 1-6 of 6 results.