|
|
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)}.
|
|
6
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,4
|
|
COMMENTS
|
The maximal height in all paths of length n is A103354(n-1).
|
|
LINKS
|
|
|
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];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|