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.

A333105 Number of 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, 1, 2, 4, 9, 21, 51, 128, 331, 880, 2402, 6724, 19285, 56612, 169908, 520723, 1627477, 5180064, 16766824, 55112302, 183710312, 620213500, 2118094664, 7309077920, 25459737905, 89438446602, 316606738516, 1128566016617, 4048230694964, 14604517154115
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-> 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_] := b[n, 0];
    a /@ Range[0, 29] (* Jean-François Alcover, Mar 30 2021, after Alois P. Heinz *)

Formula

a(n) >= A001006(n) with equality only for n <= 6.
a(n) ~ c * 4^n / n^(3/2), where c = 0.0019335749177095597674777855613451543338378695415042866523284... - Vaclav Kotesovec, Oct 24 2021

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 *)

A333070 Total number of nodes summed over all 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, 2, 6, 16, 45, 132, 399, 1240, 3951, 12870, 42746, 144420, 495300, 1721202, 6051150, 21493136, 77039070, 278377452, 1013187920, 3711505380, 13675028346, 50649452084, 188482525039, 704409735912, 2642825539375, 9950643710800, 37587291143103, 142403408032648
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-> (n+1)*b(n, 0):
    seq(a(n), n=0..30);
  • 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_] := (n+1) b[n, 0];
    a /@ Range[0, 30] (* Jean-François Alcover, Apr 05 2021, after Alois P. Heinz *)

Formula

a(n) = (n+1) * A333069(n).
a(n) ~ c * 4^n / sqrt(n), where c = 0.0131789402414023971902275212293294628834887666310830183578424168829... - 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 *)
Showing 1-4 of 4 results.