login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Wikipedia, Motzkin number
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 *)
CROSSREFS
Sequence in context: A097861 A211284 A211283 * A058719 A046661 A309105
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 28 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)