[go: up one dir, main page]

login
A128738
Triangle read by rows: T(n,k) is the number of skew Dyck paths of semilength n having k DD's (0 <= k <= n-1 for n >= 1).
3
1, 1, 2, 1, 5, 4, 1, 14, 14, 7, 1, 41, 51, 33, 11, 1, 124, 188, 145, 69, 16, 1, 386, 690, 627, 362, 131, 22, 1, 1230, 2529, 2655, 1790, 821, 230, 29, 1, 3992, 9283, 11033, 8533, 4610, 1719, 379, 37, 1, 13150, 34135, 45257, 39435, 24434, 10957, 3361, 593, 46, 1
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
E. Deutsch, E. Munarini, S. Rinaldi, Skew Dyck paths, J. Stat. Plann. Infer. 140 (8) (2010) 2191-2203
FORMULA
T(n,0) = A128739(n).
Sum_{k=0..n-1} k*T(n,k) = A128740(n).
G.f.: G = G(t,z) satisfies z^2*G^3 - z(1-t)(1-z)G^2 - (1-z)(1 - 3z + tz)G + (1-z)^2 = 0.
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