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

A333498 Sum of the heights of all Motzkin paths of length n.

Original entry on oeis.org

0, 0, 1, 3, 9, 25, 70, 196, 552, 1560, 4423, 12573, 35826, 102310, 292786, 839554, 2411945, 6941593, 20011328, 57779038, 167069317, 483739961, 1402413161, 4070537585, 11827842021, 34403798725, 100167396088, 291903951462, 851380987390, 2485175809878
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(
          b(x-1, y+j, max(h, y)), j=-min(1, y)..min(1, x-y-1)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..35);
  • Mathematica
    b[x_, y_, h_] := b[x, y, h] = If[x == 0, h, Sum[b[x - 1, y + j, Max[h, y]], {j, -Min[1, y], Min[1, x - y - 1]}]];
    a[n_] := b[n, 0, 0];
    a /@ Range[0, 35] (* Jean-François Alcover, May 10 2020, after Maple *)

Formula

a(n) = Sum_{k=1..floor(n/2)} k * A097862(n,k).

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

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

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 *)
Showing 1-5 of 5 results.