The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A333107 Total area under 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
0, 0, 1, 4, 16, 56, 190, 637, 2131, 7156, 24215, 82758, 285991, 999715, 3534394, 12631420, 45601759, 166169360, 610650687, 2261234467, 8430749631, 31625520000, 119281312293, 452077280484, 1720796968459, 6575385383602, 25212139233077, 96970372087853 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
Wikipedia, Motzkin number
MAPLE
b:= proc(x, y) option remember; `if`(x=0, [1, 0], add(
(p-> p+[0, p[1]*(y+j/2)])(b(x-1, y+j)),
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_] := b[x, y] = If[x == 0, {1, 0}, Sum[
Function[p, p + {0, p[[1]]*(y + j/2)}][b[x - 1, y + j]],
{j, -Min[1, y], Min[Max[1, y], x - y - 1]}]];
a[n_] := b[n, 0][[2]];
a /@ Range[0, 29] (* Jean-François Alcover, Apr 05 2021, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A026155 A025182 A057585 * A255301 A097128 A006079
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 May 23 04:31 EDT 2024. Contains 372758 sequences. (Running on oeis4.)