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!)
A333106 Total number of nodes summed over 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)}. 5
1, 2, 6, 16, 45, 126, 357, 1024, 2979, 8800, 26422, 80688, 250705, 792568, 2548620, 8331568, 27667109, 93241152, 318569656, 1102246040, 3857916552, 13644697000, 48716177272, 175417870080, 636493447625, 2325399611652, 8548381939932, 31599848465276 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
Wikipedia, Motzkin number
FORMULA
a(n) ~ c * 4^n / sqrt(n), where c = 0.0019335749177095597674777855613451543338378695415042866523284... - Vaclav Kotesovec, Oct 24 2021
MAPLE
b:= proc(x, y) option remember; `if`(x=0, 1, add(
b(x-1, y+j), j=-min(1, y)..min(max(1, y), x-y-1)))
end:
a:= n-> (n+1)*b(n, 0):
seq(a(n), n=0..29);
MATHEMATICA
b[x_, y_] := b[x, y] = If[x == 0, 1,
Sum[b[x-1, y+j], {j, -Min[1, y], Min[Max[1, y], x-y-1]}]];
a[n_] := (n+1) b[n, 0];
a /@ Range[0, 29] (* Jean-François Alcover, Apr 05 2021, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A126285 A026163 A005717 * A025266 A074403 A337318
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Mar 07 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 March 18 22:34 EDT 2024. Contains 370951 sequences. (Running on oeis4.)