OFFSET
0,3
COMMENTS
LINKS
Alois P. Heinz, Rows n = 0..200, flattened
E. Deutsch and S. Elizalde, Cycle up-down permutations, arXiv:0909.5199v1 [math.CO].
FORMULA
E.g.f.=(1-sin z)^{s-1}/(1-z)^s.
The trivariate e.g.f. H(t,s,z) of the permutations of {1,2,...,n} with respect to size (marked by z), number of up-down cycles (marked by t), and number of cycles that are not up-down (marked by s) is given by H(t,s,z)=(1-sin z)^{s-t}/(1-z)^s.
EXAMPLE
T(3,1)=1 because we have (123).
T(4,1)=8 because we have (1432), (1)(234), (1342), (1243), (123)(4), (1234), (124)(3), and (134)(2).
Triangle starts:
1;
1;
2;
5, 1;
16, 8;
61, 59;
272, 438, 10;
...
MAPLE
G := (1-sin(z))^(t-1)/(1-z)^t: Gser := simplify(series(G, z = 0, 16)): for n from 0 to 13 do P[n] := sort(expand(factorial(n)*coeff(Gser, z, n))) end do: for n from 0 to 13 do seq(coeff(P[n], t, j), j = 0 .. floor((1/3)*n)) end do; # yields sequence in triangular form
# second Maple program:
g:= proc(u, o) option remember;
`if`(u+o=0, 1, add(g(o-1+j, u-j), j=1..u))
end:
b:= proc(n) option remember; expand(`if`(n=0, 1, add(b(n-j)*
binomial(n-1, j-1)*((j-1)!*x-g(j-1, 0)*(x-1)), j=1..n)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
seq(T(n), n=0..14); # Alois P. Heinz, Apr 15 2017
MATHEMATICA
g[u_, o_] := g[u, o] = If[u + o == 0, 1, Sum[g[o-1+j, u-j], {j, 1, u}]];
b[n_] := b[n] = Expand[If[n == 0, 1, Sum[b[n - j]*Binomial[n-1, j-1] * ((j - 1)!*x - g[j - 1, 0]*(x - 1)), {j, 1, n}]]];
T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}] ][b[n]];
Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Nov 07 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Feb 28 2011
STATUS
approved