OFFSET
0,3
COMMENTS
A Dyck path of semilength n is a (x,y)-lattice path from (0,0) to (2n,0) that does not go below the x-axis and consists of steps U=(1,1) and D=(1,-1). A peak of a Dyck path is any lattice point visited between two consecutive steps UD.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..55
Wikipedia, Lattice path
FORMULA
a(n) ~ c * 2^(n*(n-1)), where c = 1.47818066525747143617276638534... . - Vaclav Kotesovec, Jun 01 2015
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, 2^(x-y), 1) +
b(x-1, y+1, true) ))
end:
a:= n-> b(2*n, 0, false):
seq(a(n), n=0..15);
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, 2^(x - y), 1] + b[x - 1, y + 1, True]]];
a[n_] := b[2*n, 0, False];
Table[a[n], {n, 0, 15}] (* Jean-François Alcover, Apr 23 2016, translated from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, May 22 2015
STATUS
approved