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!)
A333498 Sum of the heights of all Motzkin paths of length n. 8
0, 0, 1, 3, 9, 25, 70, 196, 552, 1560, 4423, 12573, 35826, 102310, 292786, 839554, 2411945, 6941593, 20011328, 57779038, 167069317, 483739961, 1402413161, 4070537585, 11827842021, 34403798725, 100167396088, 291903951462, 851380987390, 2485175809878 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
Wikipedia, Motzkin number
FORMULA
a(n) = Sum_{k=1..floor(n/2)} k * A097862(n,k).
MAPLE
b:= proc(x, y, h) option remember; `if`(x=0, h, add(
b(x-1, y+j, max(h, y)), j=-min(1, y)..min(1, x-y-1)))
end:
a:= n-> b(n, 0$2):
seq(a(n), n=0..35);
MATHEMATICA
b[x_, y_, h_] := b[x, y, h] = If[x == 0, h, Sum[b[x - 1, y + j, Max[h, y]], {j, -Min[1, y], Min[1, x - y - 1]}]];
a[n_] := b[n, 0, 0];
a /@ Range[0, 35] (* Jean-François Alcover, May 10 2020, after Maple *)
CROSSREFS
Sequence in context: A007046 A211286 A211285 * A097861 A211284 A211283
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 24 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 July 3 03:26 EDT 2024. Contains 373963 sequences. (Running on oeis4.)