OFFSET
0,4
COMMENTS
The maximal height in all paths of length n is floor(ceil(n/2)^2/4) = A008642(n-3) for n>2.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..300
Alois P. Heinz, Animation of a(9) = 169 paths
Wikipedia, Counting lattice paths
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-> b(n, 0$2):
seq(a(n), n=0..40);
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_] := b[n, 0, 0];
a /@ Range[0, 40] (* Jean-François Alcover, Apr 26 2021, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 31 2020
STATUS
approved