A372033 The total number of levels visited by all Motzkin paths of length n.
1, 1, 3, 7, 18, 46, 121, 323, 875, 2395, 6611, 18371, 51337, 144145, 406420, 1150126, 3265412, 9298372, 26547710, 75978322, 217921336, 626287520, 1803176384, 5200298000, 15020569818, 43447201226, 125837214564, 364911724264, 1059404265599, 3078918594707
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
- Wikipedia, Motzkin number
Programs
-
Maple
b:= proc(x, y, h) option remember; `if`(x=0, h+1, 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);