OFFSET
0,6
COMMENTS
See Ma and Chow (2012) for precise definition (cf. Proposition 3).
LINKS
Alois P. Heinz, Rows n = 0..200, flattened
Shi-Mei Ma and Chak-On Chow, Enumeration of permutations by number of cyclic peaks and cyclic valleys, arXiv preprint arXiv:1203.6264 [math.CO], 2012.
EXAMPLE
Triangle begins:
: 1;
: 0;
: 1;
: 1, 1;
: 4, 5;
: 11, 28, 5;
: 41, 153, 71;
: 162, 872, 759, 61;
: 715, 5191, 7262, 1665;
...
MAPLE
p:= proc(n) option remember; expand(`if`(n<4,
[1, 0, x, x*(1+q)][n+1], (n-1)*q*p(n-1)+
2*q*(1-q)*diff(p(n-1), q)+x*(1-q)*
diff(p(n-1), x)+(n-1)*x*p(n-2)))
end:
T:= n-> (t-> seq(coeff(t, q, i), i=0..
max(0, degree(t))))(subs(x=1, p(n))):
seq(T(n), n=0..15); # Alois P. Heinz, Apr 13 2017
MATHEMATICA
p[0] = 1; p[1] = 0; p[2] = x; p[3] = (1 + q) x;
p[n_] := p[n] = Expand[(n - 1) q p[n - 1] + 2 q (1 - q) D[p[n - 1], q] + x (1 - q) D[p[n - 1], x] + (n - 1) x p[n - 2]];
T[n_] := CoefficientList[p[n] /. x -> 1 , q]; T[1] = {0};
Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Nov 08 2017 *)
PROG
(PARI) tabf(m) = {P = x; M = subst(P, x, 1); for (d=0, poldegree(M, q), print1(polcoeff(M, d, q), ", "); ); print(""); Q = (1+q)*x; M = subst(Q, x, 1); for (d=0, poldegree(M, q), print1(polcoeff(M, d, q), ", "); ); print(""); for (n=3, m, newP = n*q*Q + 2*q*(1-q)*deriv(Q, q) + x*(1-q)*deriv(Q, x) + n*x*P; M = subst(newP, x, 1); for (d=0, poldegree(M, q), print1(polcoeff(M, d, q), ", "); ); print(""); P = Q; Q = newP; ); } \\ Michel Marcus, Feb 09 2013
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
N. J. A. Sloane, Sep 27 2012
EXTENSIONS
More terms from Michel Marcus, Feb 09 2013
One row for T(0,0)=1 prepended by Alois P. Heinz, Apr 13 2017
STATUS
approved