OFFSET
0,3
COMMENTS
A skew Dyck path is a path in the first quadrant which begins at the origin, ends on the x-axis, consists of steps U=(1,1)(up), D=(1,-1)(down) and L=(-1,-1)(left) so that up and left steps do not overlap. The length of the path is defined to be the number of its steps.
Row n has n terms (n >= 1).
Row sums yield the sequence A002212.
LINKS
Alois P. Heinz, Rows n = 0..150, flattened
E. Deutsch, E. Munarini, S. Rinaldi, Skew Dyck paths, J. Stat. Plann. Infer. 140 (8) (2010) 2191-2203
FORMULA
EXAMPLE
T(3,1)=4 because we have UDUUDD, UUDDUD, UUDUDD and UUUDDL.
Triangle starts:
1;
1;
2, 1;
5, 4, 1;
14, 14, 7, 1;
41, 51, 33, 11, 1;
MAPLE
eq:=z^2*G^3-z*(1-z)*(1-t)*G^2-(1-z)*(1-3*z+z*t)*G+(1-z)^2=0: G:=RootOf(eq, G): Gser:=simplify(series(G, z=0, 15)): for n from 0 to 11 do P[n]:=sort(expand(coeff(Gser, z, n))) od: for n from 0 to 11 do seq(coeff(P[n], t, j), j=0..n-1) od; # yields sequence in triangular form
# second Maple program:
b:= proc(n, y, t) option remember; expand(`if`(y>n, 0, `if`(n=0, 1,
`if`(t<0, 0, b(n-1, y+1, 1))+`if`(y<1, 0, b(n-1, y-1, 0)*
`if`(t=0, z, 1))+`if`(t>0 or y<1, 0, b(n-1, y-1, -1)))))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0$2)):
seq(T(n), n=0..14); # Alois P. Heinz, Jun 19 2016
MATHEMATICA
b[n_, y_, t_] := b[n, y, t] = Expand[If[y > n, 0, If[n == 0, 1, If[t < 0, 0, b[n - 1, y + 1, 1]] + If[y < 1, 0, b[n - 1, y - 1, 0]*If[t == 0, z, 1]] + If[t > 0 || y < 1, 0, b[n - 1, y - 1, -1]]]]]; T[n_] := Function [p, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 0]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Dec 20 2016, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Mar 31 2007
STATUS
approved