login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A266386
Sum over all Motzkin paths of length n of products over all peaks p of (x_p+n*y_p)/y_p, where x_p and y_p are the coordinates of peak p.
2
1, 1, 4, 11, 62, 243, 1575, 7721, 54985, 316407, 2427309, 15798261, 129072167, 927577835, 8008756470, 62499194297, 567017727805, 4747097031375, 45051331382395, 400942371431173, 3965769826314532, 37252002703698003, 382848953452815450, 3774255187367667473
OFFSET
0,3
LINKS
Wikipedia, Motzkin number
FORMULA
a(n) = A258306(n,n).
MAPLE
b:= proc(x, y, t, k) option remember; `if`(y>x or y<0, 0,
`if`(x=0, 1, b(x-1, y-1, false, k)*`if`(t, (x+k*y)/y, 1)
+b(x-1, y, false, k) +b(x-1, y+1, true, k)))
end:
a:= n-> b(n, 0, false, n):
seq(a(n), n=0..30);
MATHEMATICA
b[x_, y_, t_, k_] := b[x, y, t, k] = If[y > x || y < 0, 0, If[x == 0, 1, b[x - 1, y - 1, False, k]*If[t, (x + k*y)/y, 1] + b[x - 1, y, False, k] + b[x - 1, y + 1, True, k]]];
a[n_] := b[n, 0, False, n];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Jun 10 2017, translated from Maple *)
CROSSREFS
Main diagonal of A258306.
Sequence in context: A242749 A303955 A114053 * A134823 A000880 A006551
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 28 2015
STATUS
approved