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.

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