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.

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

A333504 Sum of the heights of 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

0, 0, 1, 3, 9, 28, 88, 282, 921, 3058, 10302, 35159, 121406, 423704, 1493046, 5307276, 19014642, 68609686, 249149529, 910000728, 3341113126, 12325295866, 45664033813, 169846998495, 634020229888, 2374550269819, 8920273989351, 33604033638696, 126919824985533
Offset: 0

Views

Author

Alois P. Heinz, Mar 24 2020

Keywords

Crossrefs

Programs

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

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.