A258172 Sum over all Dyck paths of semilength n of products over all peaks p of x_p, where x_p is the x-coordinate of peak p.
1, 1, 5, 40, 434, 5901, 95997, 1812525, 38875265, 932135347, 24678938063, 714385754446, 22428656766320, 758632387171075, 27489135956517315, 1061913384743418360, 43550536908458238570, 1889211624465639489675, 86406059558668152123975, 4154647501527354507485040
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..300
- Wikipedia, Lattice path
Crossrefs
Programs
-
Maple
b:= proc(x, y, t) option remember; `if`(y>x or y<0, 0, `if`(x=0, 1, b(x-1, y-1, false)*`if`(t, x, 1) + b(x-1, y+1, true) )) end: a:= n-> b(2*n, 0, false): seq(a(n), n=0..20);
-
Mathematica
b[x_, y_, t_] := b[x, y, t] = If[y > x || y < 0, 0, If[x == 0, 1, b[x - 1, y - 1, False]*If[t, x, 1] + b[x - 1, y + 1, True]]]; a[n_] := b[2*n, 0, False]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Apr 23 2016, translated from Maple *)
Comments