OFFSET
1,1
COMMENTS
A Grand Dyck path of semilength n is a path in the half-plane x >= 0, starting at (0,0), ending at (2n,0) and consisting of steps u = (1,1) and d = (1,-1); a double rise in a Grand Dyck path is an occurrence of uu in the path.
For all double rises (above, below and on the x-axis), see A118963.
LINKS
Alois P. Heinz, Rows n = 1..141, flattened
FORMULA
Sum_{k>=0} k*T(n,k) = A000531(n-1).
G.f.: G(t,z) = (1+r)/[1-z(1+r)C]-1, where r = r(t,z) is the Narayana function, defined by (1+r)(1+tr)z = r, r(t,0) = 0 and C = C(z) = [1-sqrt(1-4z)]/(2z) is the Catalan function. More generally, the g.f. H = H(t,s,u,z), where t,s and u mark double rises above, below and on the x-axis, respectively, is H = [1 + r(s,z)]/[1 - z(1 + tr(t,z))(1 + ur(s,z))].
EXAMPLE
T(3,1) = 5 because we have u/ududd,u/uddud,udu/udd,duu/udd and u/udddu (the double rises above the x-axis are indicated by /.
Triangle starts:
2;
5, 1;
14, 5, 1;
42, 19, 8, 1;
132, 67, 40, 12, 1;
MAPLE
C:=(1-sqrt(1-4*z))/2/z: r:=(1-z-t*z-sqrt(z^2*t^2-2*z^2*t-2*z*t+z^2-2*z+1))/2/t/z: G:=(1+r)/(1-z*C*(1+r))-1: Gser:=simplify(series(G, z=0, 15)): for n from 1 to 11 do P[n]:=coeff(Gser, z, n) od: for n from 1 to 11 do seq(coeff(P[n], t, j), j=0..n-1) od; # yields sequence in triangular form
# second Maple program:
b:= proc(x, y, t) option remember; `if`(abs(y)>x, 0,
`if`(x=0, 1, expand(`if`(t=2, z, 1)*b(x-1, y+1,
`if`(y>=0, min(t+1, 2), 1)) +b(x-1, y-1, 1))))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=0..n-1))(b(2*n, 0, 1)):
seq(T(n), n=1..12); # Alois P. Heinz, Jun 16 2014
MATHEMATICA
b[x_, y_, t_] := b[x, y, t] = If[Abs[y] > x, 0, If[x == 0, 1, Expand[If[t == 2, z, 1]*b[x-1, y+1, If[y >= 0, Min[t+1, 2], 1]] + b[x-1, y-1, 1]]]]; T[n_] := Function[ {p}, Table[Coefficient[p, z, i], {i, 0, n-1}]][b[2*n, 0, 1]]; Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Feb 19 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, May 07 2006
EXTENSIONS
Keyword tabf changed to tabl by Michel Marcus, Apr 07 2013
STATUS
approved