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.

A333678 Total area under all nonnegative lattice paths from (0,0) to (n,0) such that slopes of adjacent steps differ by at most one, assuming zero slope before and after the paths.

Original entry on oeis.org

0, 0, 0, 2, 7, 22, 64, 196, 574, 1762, 5379, 16378, 49380, 148892, 449004, 1353718, 4076150, 12267160, 36903433, 110979048, 333628384, 1002722482, 3013085711, 9052404522, 27192329061, 81671691634, 245271884478, 736513920180, 2211445194899, 6639545054310
Offset: 0

Views

Author

Alois P. Heinz, Apr 01 2020

Keywords

Crossrefs

Programs

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

A333679 Sum of the heights of all nonnegative lattice paths from (0,0) to (n,0) such that slopes of adjacent steps differ by at most one, assuming zero slope before and after the paths.

Original entry on oeis.org

0, 0, 0, 1, 3, 8, 20, 53, 137, 375, 1035, 2878, 7988, 22308, 62642, 176692, 499818, 1418228, 4035568, 11512449, 32916181, 94313011, 270757747, 778694171, 2243200705, 6471953522, 18699169766, 54098598824, 156706773404, 454457344755, 1319382151919, 3834346819731
Offset: 0

Views

Author

Alois P. Heinz, Apr 01 2020

Keywords

Comments

The maximal height in all paths of length n is floor(ceil(n/2)^2/4) = A008642(n-3) for n>2.

Crossrefs

Programs

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

A333680 Total number of nodes summed over all nonnegative lattice paths from (0,0) to (n,0) such that slopes of adjacent steps differ by at most one, assuming zero slope before and after the paths.

Original entry on oeis.org

1, 2, 3, 8, 20, 48, 112, 272, 666, 1690, 4367, 11436, 30147, 80248, 215550, 583456, 1588956, 4351806, 11979481, 33127440, 91982688, 256354098, 716879847, 2010919560, 5656813275, 15954441334, 45106324389, 127809023944, 362897750254, 1032389760540, 2942278599032
Offset: 0

Views

Author

Alois P. Heinz, Apr 01 2020

Keywords

Crossrefs

Programs

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

Formula

a(n) = (n+1) * A333647(n).

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

A333682 Number of nonnegative lattice paths from (0,0) to (4n+3,0) such that slopes of adjacent steps differ by one, assuming zero slope before and after the paths.

Original entry on oeis.org

1, 3, 16, 119, 1070, 10751, 116287, 1326581, 15756587, 193181910, 2429921124, 31216684816, 408198225495, 5418728779290, 72871393962150, 991102308239835, 13613940451015378, 188650695857473559, 2634681336798911129, 37054660535787380825, 524449965598846642847
Offset: 0

Views

Author

Alois P. Heinz, Apr 01 2020

Keywords

Comments

The maximal height in all paths of length 4n+3 is (n+1)^2 = A000290(n+1).
The maximal area under all paths of length 4n+3 is 2*(n+1)^3 = A033431(n+1).

Crossrefs

Programs

  • Maple
    b:= proc(x, y, t) option remember; `if`(x=0, 1, add(`if`(j=t, 0,
          b(x-1, y+j, j)), j=max(t-1, -y)..min(x*(x-1)/2-y, t+1)))
        end:
    a:= n-> b(4*n+3, 0$2):
    seq(a(n), n=0..23);
Showing 1-5 of 5 results.