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 a path is defined to be the number of steps in it.
Row 0 and row 1 have one term each; row n has n-1 terms (n >= 2).
Row sums yield 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(4,1)=5 because we have UDUUUDLL, UUUUDLLD, UUDUUDLL, UUUDUDLL and UUUUDDLL.
Triangle starts:
1;
1;
3;
9, 1;
30, 5, 1;
107, 23, 6, 1;
MAPLE
eq:=z^2*G^3-z*(2-t*z)*G^2+(1+z-z^2-t*z)*G+t*z-1=0: G:=RootOf(eq, G): Gser:=simplify(series(G, z=0, 15)): for n from 0 to 12 do P[n]:=sort(coeff(Gser, z, n)) od: 1; 1; for n from 2 to 12 do seq(coeff(P[n], t, j), j=0..n-2) 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 or y<1, 0, b(n-1, y-1, -1)*`if`(t<0, z, 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 || y < 1, 0, b[n - 1, y - 1, -1]*If[t < 0, z, 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, Oct 24 2016, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Mar 31 2007
STATUS
approved