1 Introduction

A permutation \(\sigma \) is called cycle-alternating if it has no cycle double rises, cycle double falls, or fixed points; thus, each cycle of \(\sigma \) is of even length (call it 2m) and consists of m cycle valleys and m cycle peaks in alternation.Footnote 1 Deutsch and Elizalde [5, Proposition 2.2] showed that the number of cycle-alternating permutations of [2n] is the secant number \(E_{2n}\) (see also Dumont [11, pp. 37, 40] and Biane [1, Sect. 6]). In this paper we would like to present some new continued fractions for multivariate polynomials that enumerate cycle-alternating permutations with respect to a large set of statistics (8 or 16 variables).

But first it may be appropriate to place this project in a wider context. In a recent article [31], Zeng and one of us presented Stieltjes-type and Jacobi-type continued fractions for some “master polynomials” that enumerate permutations, set partitions or perfect matchings with respect to a large (sometimes infinite) number of independent statistics. These polynomials systematize what we think of as the “linear family”: namely, sequences in which the Stieltjes continued-fraction coefficients \((\alpha _n)_{n \ge 1}\) grow linearly in n. For instance, Euler [13, Sect. 21] showed in 1746 that

$$\begin{aligned} \sum _{n=0}^\infty n! \, t^n \;=\; \frac{1}{1 - \frac{1t}{1 - \frac{1t}{1 - \frac{2t}{1- \frac{2t}{1-\cdots }}}}}. \end{aligned}$$
(1.1)

In other words, the ordinary generating function (ogf) of the sequence \(a_n = n!\) has a Stieltjes-type continued fraction with coefficients \(\alpha _{2k-1} = \alpha _{2k} = k\). This inspired us to introduce the polynomials \(P_n(x,y,u,v)\) defined by the continued fraction

$$\begin{aligned} \sum _{n=0}^\infty P_n(x,y,u,v) \, t^n \;=\; \frac{1}{1 - \frac{xt}{1 - \frac{yt}{1 - \frac{(x+u)t}{1- \frac{(y+v)t}{1 - \frac{(x+2u)t}{1 - \frac{(y+2v)t}{1-\cdots }}}}}}}, \end{aligned}$$
(1.2)

with coefficients

$$\begin{aligned} \alpha _{2k-1}= & x + (k-1) u, \end{aligned}$$
(1.3a)
$$\begin{aligned} \alpha _{2k}= & y + (k-1) v. \end{aligned}$$
(1.3b)

Clearly \(P_n(x,y,u,v)\) is a homogeneous polynomial of degree n, with nonnegative integer coefficients; and since \(P_n(1,1,1,1) = n!\), which enumerates permutations of an n-element set, it was plausible to expect that \(P_n(x,y,u,v)\) enumerates permutations of [n] according to some natural fourfold classification of indices in [n]. Our first theorem [31, Theorem 2.1] provided two alternative versions of that classification.

But there are other sequences of integers, and hence other combinatorial models, that also belong to the “linear family”. For instance, in that same paper Euler also showed [13, Sect. 29] (see also [14]) that the generating function of the odd semifactorials can be represented as a Stieltjes-type continued fraction

$$\begin{aligned} \sum _{n=0}^\infty (2n-1)!! \, t^n \;=\; \frac{1}{1 - \frac{1t}{1 - \frac{2t}{1 - \frac{3t}{1- \cdots }}}}, \end{aligned}$$
(1.4)

with coefficients \(\alpha _n = n\). Inspired by (1.4), we introduced the polynomials \(M_n(x,y,u,v)\) defined by the continued fraction

$$\begin{aligned} \sum _{n=0}^\infty M_n(x,y,u,v) \, t^n \;=\; \frac{1}{1 - \frac{xt}{1 - \frac{(y+v)t}{1 - \frac{(x+2u)t}{1- \frac{(y+3v)t}{1 - \frac{(x+4u)t}{1 - \frac{(y+5v)t}{1-\cdots }}}}}}}, \end{aligned}$$
(1.5)

with coefficients

$$\begin{aligned} \alpha _{2k-1}= & x + (2k-2) u, \end{aligned}$$
(1.6a)
$$\begin{aligned} \alpha _{2k}= & y + (2k-1) v. \end{aligned}$$
(1.6b)

Clearly \(M_n(x,y,u,v)\) is a homogeneous polynomial of degree n, with nonnegative integer coefficients; and since \(M_n(1,1,1,1) = (2n-1)!!\), which enumerates perfect matchings of a 2n-element set, it was plausible to expect that \(M_n(x,y,u,v)\) enumerates perfect matchings of [2n] (or equivalently, fixed-point-free involutions of [2n]) according to some natural fourfold classification associated to half of the indices in [2n]. In [31, Theorem 4.1] we identified such a classification, involving even and odd cycle peaks and their antirecord status.

In a very recent paper [2], the two present authors took one step up in complexity, to consider the “quadratic family”, in which the \((\alpha _n)_{n \ge 1}\) grow quadratically in n. For instance, we could consider

$$\begin{aligned} \alpha _{2k-1}= & [x_1 + (k-1) u_1] \, [x_2 + (k-1) u_2], \end{aligned}$$
(1.7a)
$$\begin{aligned} \alpha _{2k}= & [y_1 + (k-1) v_1] \, [y_2 + (k-1) v_2], \end{aligned}$$
(1.7b)

which can be thought of as the product of two independent sets of coefficients (1.3). With all parameters set to 1, these coefficients \(\alpha _{2k-1} = \alpha _{2k} = k^2\) correspond to the continued fraction [35, Eq. (9.7)] [36, pp. 5–15] for the median Genocchi numbers [23, A005439]; so it was natural to seek a combinatorial model that is enumerated by the median Genocchi numbers. In [2] we considered D-permutations [20, 21] and various subclasses thereof (D-semiderangements and D-derangements), and found Stieltjes-type and Thron-type continued fractions for some multivariate polynomials enumerating these objects with respect to a large set of statistics (12 or 22 variables).

But just as with the “linear family”, there are other sequences of integers, and hence other combinatorial models, that also belong to the “quadratic family”. For instance, the secant numbers \(E_{2n}\) [23, A000364] can be represented by the continued fraction [34, p. H9] [26, p. 77] [15, Theorem 3B(iii)]

$$\begin{aligned} \sum _{n=0}^\infty E_{2n} t^n \;=\; \frac{1}{1 - \frac{1^2 t}{1 - \frac{2^2 t}{1 - \frac{3^2 t}{1- \cdots }}}}, \end{aligned}$$
(1.8)

with coefficients \(\alpha _n = n^2\). In [31, Sect. 2.15] this was generalized by introducing the polynomials \(Q_n(x,y,u,v)\) whose ogf has an S-fraction with coefficients \(\alpha _n = [x+ (n-1)u] \, [y + (n-1)v]\), and they were interpreted as enumerating cycle-alternating permutations of [2n] according to the antirecord status of cycle peaks and the record status of cycle valleys.

In the present paper we shall go farther, and introduce polynomials \(Q_n(x',y',u',v',\) \(x'',y'',u'',v'')\) whose ogf has an S-fraction with coefficients

$$\begin{aligned} \alpha _{2k-1}= & [x' + (2k-2) u'] \, [y' + (2k-2) v'], \end{aligned}$$
(1.9a)
$$\begin{aligned} \alpha _{2k}= & [x'' + (2k-1) u''] \, [y'' + (2k-1) v''], \end{aligned}$$
(1.9b)

which can be thought of as the product of two independent sets of coefficients (1.6). When \(x'=x''\), \(y'=y''\), \(u'=u''\), \(v'=v''\) this reduces to the previous polynomials. We will interpret these 8-variable polynomials as enumerating cycle-alternating permutations of [2n] according to the antirecord status of cycle peaks and the record status of cycle valleys, separately for even and odd indices (Theorem 4.1).Footnote 2 We will also obtain a generalization of this result to 16-variable polynomials that include four pairs of variables (pq) that count crossings and nestings (Theorem 4.4). The proofs will in fact be easy applications of the “master” S-fraction for cycle-alternating permutations [31, Theorem 2.20]. Finally, we will obtain variants that include the counting of cycles, at the expense of renouncing taking account of the record status of cycle valleys (Theorems 5.1, 5.2).

This leaves us with the following analogy between the linear and quadratic families:

figure a

The only slight flaw in the analogy is that the permutations are on [n], while the other three models are on [2n].

This suggests to pursue the analogy one step further: the third combinatorial model in the “linear family” is set partitions, with \(a_n = B_n\) (Bell number) and \(\alpha _{2k-1} = 1\), \(\alpha _{2k} = k\). The corresponding member of the “quadratic family” would have \(\alpha _{2k-1} = 1\), \(\alpha _{2k} = k^2\), which leads to the sequence

$$\begin{aligned} (a_n)_{n \ge 0} \;=\; 1, 1, 2, 5, 17, 78, 461, 3417, 31134, 340217, 4365673, \ldots . \end{aligned}$$
(1.10)

Alas, this sequence is not at present in the OEIS [23], and we have no idea what combinatorial model it might represent.

We can, in fact, place our results on cycle-alternating permutations in a wider context: namely, that of Laguerre digraphs. A Laguerre digraph [4, 17, 29] is a digraph in which each vertex has out-degree 0 or 1 and in-degree 0 or 1. Therefore, each weakly connected component of a Laguerre digraph is either a directed path of some length \(\ell \ge 0\) (where a path of length 0 is an isolated vertex) or else a directed cycle of some length \(\ell \ge 1\) (where a cycle of length 1 is a loop). A Laguerre digraph with no paths is simply a collection of directed cycles, i.e. the digraph associated to a permutation; so Laguerre digraphs generalize permutations. We shall then define a subclass of Laguerre digraphs, called alternating Laguerre digraphs, that similarly generalizes cycle-alternating permutations. We shall show that the generalized Stieltjes–Rogers polynomials associated to the cycle-counting variant of the S-fraction (1.9), as well as its generalizations, can be interpreted as enumerating alternating Laguerre digraphs with suitable weights.

The plan of this paper is as follows: In Sects. 2 and 3 we review some needed definitions and facts concerning continued fractions and permutation statistics, respectively. In Sect. 4 we state and prove our “first” S-fractions for cycle-alternating permutations (namely, the ones not including the counting of cycles); and in Sect. 5 we do the same for our “second” S-fractions (namely, those including the counting of cycles). In Sect. 6 we put cycle-alternating permutations into the wider context of alternating Laguerre digraphs, and then use this to interpret the generalized Stieltjes–Rogers polynomials associated to some of our continued fractions.

2 Preliminaries: continued fractions

In this section we define the objects associated to continued fractions that will be used in the remainder of the paper, and review some of their properties.

2.1 Motzkin and Dyck paths

A Motzkin path is a path in the upper half-plane \({{\mathbb {Z}}}\times {{\mathbb {N}}}\), starting and ending on the horizontal axis, using the steps (1, 1) [“rise”], (1, 0) [“level step”] and \((1,-1)\) [“fall”]. More generally, a partial Motzkin path is a path in the upper half-plane \({{\mathbb {Z}}}\times {{\mathbb {N}}}\), starting on the horizontal axis but ending anywhere, using the steps (1, 1), (1, 0) and \((1,-1)\).

A Dyck path is a path in the upper half-plane \({{\mathbb {Z}}}\times {{\mathbb {N}}}\), starting and ending on the horizontal axis, using the steps (1, 1) [“rise”] and \((1,-1)\) [“fall”]; that is, it is a Motzkin path that has no level steps. Obviously a Dyck path must have even length. More generally, a partial Dyck path is a path in the upper half-plane \({{\mathbb {Z}}}\times {{\mathbb {N}}}\), starting on the horizontal axis but ending anywhere, using the steps (1, 1) and \((1,-1)\).

We shall usually take all these paths to start at the origin (0, 0). Then any partial Dyck path must stay on the even sublattice \(\{(n,k) :\, n+k \text { is even} \}\).

2.2 J-fractions and Jacobi–Rogers polynomials

Let \({{\varvec{\beta }}}= (\beta _i)_{i \ge 1}\) and \({{\varvec{\gamma }}}= (\gamma _i)_{i \ge 0}\) be indeterminates. Following Flajolet [15], we define the Jacobi–Rogers polynomials \(J_n({{\varvec{\beta }}},{{\varvec{\gamma }}})\) to be the Taylor coefficients of the generic J-fraction:

$$\begin{aligned} \sum _{n=0}^\infty J_n({{\varvec{\beta }}},{{\varvec{\gamma }}}) \, t^n \;=\; \frac{1}{1 - \gamma _0 t - \frac{\beta _1 t^2}{1 - \gamma _1 t - \frac{\beta _2 t^2}{1 - \cdots }}} \;. \end{aligned}$$
(2.1)

Clearly \(J_n({{\varvec{\beta }}},{{\varvec{\gamma }}})\) is a polynomial in \({{\varvec{\beta }}}\) and \({{\varvec{\gamma }}}\), with nonnegative integer coefficients. Flajolet [15] showed that the Jacobi–Rogers polynomial \(J_n({{\varvec{\beta }}},{{\varvec{\gamma }}})\) is the generating polynomial for Motzkin paths of length n, in which each rise gets weight 1, each fall from height i gets weight \(\beta _i\), and each level step at height i gets weight \(\gamma _i\).

Now define the generalized Jacobi–Rogers polynomial \(J_{n,k}({{\varvec{\beta }}},{{\varvec{\gamma }}})\) to be the generating polynomial for partial Motzkin paths from (0, 0) to (nk), in which each rise gets weight 1, each fall from height i gets weight \(\beta _i\), and each level step at height i gets weight \(\gamma _i\). Obviously \(J_{n,k}\) is nonvanishing only for \(0 \le k \le n\), so we have an infinite lower-triangular array \(\textsf{J}= \big ( J_{n,k}({{\varvec{\beta }}},{{\varvec{\gamma }}}) \big )_{\! n,k \ge 0}\) in which the zeroth column displays the ordinary Jacobi–Rogers polynomials \(J_{n,0} = J_n\). On the diagonal we have \(J_{n,n} = 1\), and on the first subdiagonal we have \(J_{n,n-1} = \sum _{i=0}^{n-1} \gamma _i\). By considering the last step of the path, we see that the polynomials \(J_{n,k}({{\varvec{\beta }}},{{\varvec{\gamma }}})\) satisfy the recurrence

$$\begin{aligned} J_{n+1,k} \;=\; J_{n,k-1} \,+\, \gamma _k J_{n,k} \,+\, \beta _{k+1} J_{n,k+1}, \end{aligned}$$
(2.2)

with the initial condition \(J_{0,k} = \delta _{k0}\) (where of course we set \(J_{n,-1} = 0\)).

A redundant generalization of these polynomials, in which we also weight rises in the Motzkin path, will be useful later. Let \({{\textsf {{\textbf {a}}}}}= ({\textsf{a}}_i)_{i \ge 0}, {{\textsf {{\textbf {b}}}}}= ({\textsf{b}}_i)_{i \ge 1}\) and \({{\textsf {{\textbf {c}}}}}= ({\textsf{c}}_i)_{i \ge 0}\) be indeterminates. Define \(J_{n,k}({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}},{{\textsf {{\textbf {c}}}}})\) to be the generating polynomial for partial Motzkin paths from (0, 0) to (nk), in which each rise from height i gets weight \({\textsf{a}}_i\), each fall from height i gets weight \({\textsf{b}}_i\), and each level step at height i gets weight \({\textsf{c}}_i\). By considering the last step of the path, we see that these polynomials satisfy the recurrence

$$\begin{aligned} J_{n+1,k}\;=\; {\textsf{a}}_{k-1} J_{n,k-1} \,+\, {\textsf{c}}_k J_{n,k} \,+\, {\textsf{b}}_{k+1} J_{n,k+1}. \end{aligned}$$
(2.3)

The recurrences (2.2) and (2.3) then easily imply the following proposition:

Proposition 2.1

The polynomials \(J_{n,k}({{\textsf {{\textbf {a}}}}}, {{\textsf {{\textbf {b}}}}}, {{\textsf {{\textbf {c}}}}})\) are related to the polynomials \(J_{n,k}({{\varvec{\beta }}},{{\varvec{\gamma }}})\) with weights

$$\begin{aligned} \beta _n= & {\textsf{a}}_{n-1} {\textsf{b}}_n, \end{aligned}$$
(2.4a)
$$\begin{aligned} \gamma _n= & {\textsf{c}}_{n}, \end{aligned}$$
(2.4b)

by

$$\begin{aligned} J_{n,k}({{\textsf {{\textbf {a}}}}}, {{\textsf {{\textbf {b}}}}}, {{\textsf {{\textbf {c}}}}}) \;=\; \left( \prod \limits _{i=0}^{k-1}{\textsf{a}}_i \right) J_{n,k}({{\varvec{\beta }}}, {{\varvec{\gamma }}}). \end{aligned}$$
(2.5)

We remark that since \(J_{n,k}({{\varvec{\beta }}}, {{\varvec{\gamma }}})\) is by definition a polynomial, it follows that the polynomial \(J_{n,k}({{\textsf {{\textbf {a}}}}}, {{\textsf {{\textbf {b}}}}}, {{\textsf {{\textbf {c}}}}})\) necessarily has a factor \(\prod \limits _{i=0}^{k-1}{\textsf{a}}_i\), and that \(J_{n,k}({{\varvec{\beta }}}, {{\varvec{\gamma }}}) = J_{n,k}({{\textsf {{\textbf {a}}}}}, {{\textsf {{\textbf {b}}}}}, {{\textsf {{\textbf {c}}}}}) \Big /\prod \limits _{i=0}^{k-1}{\textsf{a}}_i\).

Proof

Let us use the shorthands \(J_{n,k} = J_{n,k}({{\varvec{\beta }}}, {{\varvec{\gamma }}})\) and \(J'_{n,k} = J_{n,k}({{\textsf {{\textbf {a}}}}}, {{\textsf {{\textbf {b}}}}}, {{\textsf {{\textbf {c}}}}})\); and define \(p_k = \prod \limits _{i=0}^{k-1} {\textsf{a}}_i\). The recurrence (2.2), with weights (2.4), is

$$\begin{aligned} J_{n+1,k} \;=\; J_{n,k-1} \,+\, {\textsf{c}}_k J_{n,k} \,+\, {\textsf{a}}_k{\textsf{b}}_{k+1} J_{n,k+1} . \end{aligned}$$
(2.6)

Multiplying both sides of (2.6) with \(p_{k}\) yields

$$\begin{aligned} J_{n+1,k} \, p_k & = p_k \left( J_{n,k-1} \,+\, {\textsf{c}}_k J_{n,k} \,+\, {\textsf{a}}_k{\textsf{b}}_{k+1} J_{n,k+1} \right) \end{aligned}$$
(2.7a)
$$\begin{aligned} & = {\textsf{a}}_{k-1} \left( J_{n,k-1} \, p_{k-1} \right) \,+\, {\textsf{c}}_k \left( J_{n,k} \, p_k\right) \,\nonumber \\ & \quad \,\, +\, {\textsf{b}}_{k+1} \left( J_{n,k+1} \, p_{k+1} \right) . \end{aligned}$$
(2.7b)

Comparing the coefficients in (2.7b) and (2.3), we notice that the recurrences for the polynomials \(J_{n,k} \, p_k\) and \(J_{n,k}'\) are exactly the same; and of course the initial conditions are the same as well. This shows that \(J_{n,k}' = J_{n,k} \, p_k\), as claimed in (2.5). \(\square \)

One important algebraic tool for studying J-fractions is Rogers’ addition formula [26] [37, Theorem 53.1], which we state in the form given in [30, Theorem 9.9]:

Theorem 2.2

(Rogers’ addition formula) The column exponential generating functions of the matrix of generalized Jacobi–Rogers polynomials,

$$\begin{aligned} {\mathcal {J}}_k(t;{{\varvec{\beta }}},{{\varvec{\gamma }}}) \;{\mathop {=}\limits ^\textrm{def}}\; \sum _{n=k}^\infty J_{n,k}({{\varvec{\beta }}},{{\varvec{\gamma }}}) \, {t^n \over n!} , \end{aligned}$$
(2.8)

satisfy

$$\begin{aligned} {\mathcal {J}}_0(t+u;{{\varvec{\beta }}},{{\varvec{\gamma }}}) \;=\; \sum \limits _{k=0}^\infty \beta _1 \cdots \beta _k \, {\mathcal {J}}_k(t;{{\varvec{\beta }}},{{\varvec{\gamma }}}) \, {\mathcal {J}}_k(u;{{\varvec{\beta }}},{{\varvec{\gamma }}}) . \end{aligned}$$
(2.9)

And conversely, if A(t) and \(F_0(t), F_1(t), \ldots \) are formal power series (with elements in a commutative ring R containing the rationals) satisfying

$$\begin{aligned} A(t) \;=\; 1 + O(t) ,\qquad F_k(t) \;=\; {t^k \over k!} \,+\, \mu _k {t^{k+1} \over (k+1)!} \,+\, O(t^{k+2}), \end{aligned}$$
(2.10)

and

$$\begin{aligned} A(t+u) \;=\; \sum \limits _{k=0}^\infty \beta _1 \cdots \beta _k \, F_k(t) \, F_k(u), \end{aligned}$$
(2.11)

for some regular elements \({{\varvec{\beta }}}= (\beta _k)_{k \ge 1}\), then \(A(t) = F_0(t)\) and \(F_k(t) = {\mathcal {J}}_k(t;{{\varvec{\beta }}},{{\varvec{\gamma }}})\) with the given \({{\varvec{\beta }}}\) and with \(\gamma _k = \mu _k - \mu _{k-1}\) (where \(\mu _{-1} {\mathop {=}\limits ^\textrm{def}}0\)).

Here an element of a commutative ring R is called regular if it is neither zero nor a divisor of zero.

2.3 S-fractions and Stieltjes–Rogers polynomials

Let \({{\varvec{\alpha }}}= (\alpha _i)_{i \ge 1}\) be indeterminates. Again following Flajolet [15], we define the Stieltjes–Rogers polynomials \(S_n({{\varvec{\alpha }}})\) to be the Taylor coefficients of the generic S-fraction:

$$\begin{aligned} \sum _{n=0}^\infty S_n({{\varvec{\alpha }}}) \, t^n \;=\; \frac{1}{1 - \frac{\alpha _1 t}{1 - \frac{\alpha _2 t}{1- \cdots }}} \;. \end{aligned}$$
(2.12)

Clearly \(S_n({{\varvec{\alpha }}})\) is a homogeneous polynomial of degree n in \({{\varvec{\alpha }}}\), with nonnegative integer coefficients. Flajolet [15] showed that the Stieltjes–Rogers polynomial \(S_n({{\varvec{\alpha }}})\) is the generating polynomial for Dyck paths of length 2n, in which each rise gets weight 1 and each fall from height i gets weight \(\alpha _i\).

Now define the generalized Stieltjes–Rogers polynomial of the first kind \(S_{n,k}({{\varvec{\alpha }}})\) to be the generating polynomial for Dyck paths starting at (0, 0) and ending at (2n, 2k), in which each rise gets weight 1 and each fall from height i gets weight \(\alpha _i\). Obviously \(S_{n,k}\) is nonvanishing only for \(0 \le k \le n\), so we have an infinite lower-triangular array \(\textsf{S}= (S_{n,k}({{\varvec{\alpha }}}))_{n,k \ge 0}\) in which the zeroth column displays the ordinary Stieltjes–Rogers polynomials \(S_{n,0} = S_n\). We have \(S_{n,n} = 1\) and \(S_{n,n-1} = \sum _{i=1}^{2n-1} \alpha _i\).

Likewise, let us define the generalized Stieltjes–Rogers polynomial of the second kind \(S'_{n,k}({{\varvec{\alpha }}})\) to be the generating polynomial for Dyck paths starting at (0, 0) and ending at \((2n+1,2k+1)\), in which again each rise gets weight 1 and each fall from height i gets weight \(\alpha _i\). Since \(S'_{n,k}\) is nonvanishing only for \(0 \le k \le n\), we obtain a second infinite lower-triangular array \(\textsf{S}' = (S'_{n,k}({{\varvec{\alpha }}}))_{n,k \ge 0}\). We have \(S'_{n,n} = 1\) and \(S'_{n,n-1} = \sum _{i=1}^{2n} \alpha _i\).

The polynomials \(S_{n,k}({{\varvec{\alpha }}})\) and \(S'_{n,k}({{\varvec{\alpha }}})\) manifestly satisfy the joint recurrence

$$\begin{aligned} S'_{n,k}= & S_{n,k} \,+\, \alpha _{2k+2} \, S_{n,k+1}, \end{aligned}$$
(2.13a)
$$\begin{aligned} S_{n+1,k}= & S'_{n,k-1} \,+\, \alpha _{2k+1} \, S'_{n,k}, \end{aligned}$$
(2.13b)

for \(n,k \ge 0\), with the initial conditions \(S_{0,k} = \delta _{k 0}\) and \(S'_{n,-1} = 0\). It follows that the \(S_{n,k}\) satisfy the recurrence

$$\begin{aligned} S_{n+1,k} \;=\; S_{n,k-1} \,+\, (\alpha _{2k} + \alpha _{2k+1}) \, S_{n,k} \,+\, \alpha _{2k+1} \alpha _{2k+2} \, S_{n,k+1}, \end{aligned}$$
(2.14)

(where \(S_{n,-1} = 0\) and \(\alpha _0 = 0\)), while the \(S'_{n,k}\) satisfy the recurrence

$$\begin{aligned} S'_{n+1,k} \;=\; S'_{n,k-1} \,+\, (\alpha _{2k+1} + \alpha _{2k+2}) \, S'_{n,k} \,+\, \alpha _{2k+2} \alpha _{2k+3} \, S'_{n,k+1} . \end{aligned}$$
(2.15)

Note that (2.14) and (2.15) have the same form as (2.2), when \({{\varvec{\beta }}}\) and \({{\varvec{\gamma }}}\) are defined suitably in terms of the \({{\varvec{\alpha }}}\): these correspondences are examples of contraction formulae [37, p. 21] [36, pp. 5-31] that express an S-fraction as an equivalent J-fraction. In particular we have \(S_{n,k}({{\varvec{\alpha }}}) = J_{n,k}({{\varvec{\beta }}},{{\varvec{\gamma }}})\) where

$$\begin{aligned} \gamma _0= & \alpha _1, \end{aligned}$$
(2.16a)
$$\begin{aligned} \gamma _n= & \alpha _{2n} + \alpha _{2n+1} \qquad \hbox {for} n \ge 1, \end{aligned}$$
(2.16b)
$$\begin{aligned} \beta _n= & \alpha _{2n-1} \alpha _{2n}, \end{aligned}$$
(2.16c)

and \(S'_{n,k}({{\varvec{\alpha }}}) = J_{n,k}({{\varvec{\beta }}}',{{\varvec{\gamma }}}')\) where

$$\begin{aligned} \gamma '_n= & \alpha _{2n+1} + \alpha _{2n+2}, \end{aligned}$$
(2.17a)
$$\begin{aligned} \beta '_n= & \alpha _{2n} \alpha _{2n+1}. \end{aligned}$$
(2.17b)

The recurrences (2.2)/(2.14)/(2.15) define implicitly the (tridiagonal) production matrices for \(\textsf{J}\), \(\textsf{S}\) and \(\textsf{S}'\): see [6, 7, 24]. Some workers call the arrays \(\textsf{J}\), \(\textsf{S}\) and/or \(\textsf{S}'\) the Stieltjes table.

More trivially, a partial Dyck path is simply a partial Motzkin path with no level steps. Therefore, the generalized Stieltjes–Rogers polynomials with weights \({{\varvec{\alpha }}}\) can be related to the generalized Jacobi–Rogers polynomials with weights \(({{\varvec{\beta }}},{{\varvec{\gamma }}}) = ({{\varvec{\alpha }}},{{\varvec{0}}})\) by

$$\begin{aligned} S_{n,k}({{\varvec{\alpha }}})= & J_{2n,2k}({{\varvec{\alpha }}},{{\varvec{0}}}), \end{aligned}$$
(2.18a)
$$\begin{aligned} S'_{n,k}({{\varvec{\alpha }}})= & J_{2n+1,2k+1}({{\varvec{\alpha }}},{{\varvec{0}}}), \end{aligned}$$
(2.18b)

and

$$\begin{aligned} J_{n,k}({{\varvec{\alpha }}},{{\varvec{0}}}) \;=\; 0 \quad \hbox {if}\,\, n+k\,\, \text {is odd}. \end{aligned}$$
(2.19)

3 Preliminaries: permutation statistics

In this section we define the permutation statistics that will be used in the remainder of the paper.

3.1 The record-and-cycle classification

Given a permutation \(\sigma \in {\mathfrak {S}}_N\), an index \(i \in [N]\) is called an

  • excedance (exc) if \(i < \sigma (i)\);

  • anti-excedance (aexc) if \(i > \sigma (i)\);

  • fixed point (fix) if \(i = \sigma (i)\).

Clearly every index i belongs to exactly one of these three types; we call this the excedance classification. We also say that i is a weak excedance if \(i \le \sigma (i)\), and a weak anti-excedance if \(i \ge \sigma (i)\).

A more refined classification is as follows: an index \(i \in [N]\) is called a

  • cycle peak (cpeak) if \(\sigma ^{-1}(i) < i > \sigma (i)\);

  • cycle valley (cval) if \(\sigma ^{-1}(i) > i < \sigma (i)\);

  • cycle double rise (cdrise) if \(\sigma ^{-1}(i)< i < \sigma (i)\);

  • cycle double fall (cdfall) if \(\sigma ^{-1}(i)> i > \sigma (i)\);

  • fixed point (fix) if \(\sigma ^{-1}(i) = i = \sigma (i)\).

Clearly every index i belongs to exactly one of these five types; we refer to this classification as the cycle classification. Obviously, excedance = cycle valley or cycle double rise, and anti-excedance = cycle peak or cycle double fall. We write

$$\begin{aligned} \textrm{Cpeak}(\sigma ) \;=\; \{ i :\, \sigma ^{-1}(i) < i > \sigma (i) \}, \end{aligned}$$
(3.1)

for the set of cycle peaks and

$$\begin{aligned} \textrm{cpeak}(\sigma ) \;=\; |\textrm{Cpeak}(\sigma )|, \end{aligned}$$
(3.2)

for its cardinality, and likewise for the others.

On the other hand, an index \(i \in [N]\) is called a

  • record (rec) (or left-to-right maximum) if \(\sigma (j) < \sigma (i)\) for all \(j < i\) [note in particular that the indices 1 and \(\sigma ^{-1}(N)\) are always records];

  • antirecord (arec) (or right-to-left minimum) if \(\sigma (j) > \sigma (i)\) for all \(j > i\) [note in particular that the indices N and \(\sigma ^{-1}(1)\) are always antirecords];

  • exclusive record (erec) if it is a record and not also an antirecord;

  • exclusive antirecord (earec) if it is an antirecord and not also a record;

  • record-antirecord (rar) (or pivot) if it is both a record and an antirecord;

  • neither-record-antirecord (nrar) if it is neither a record nor an antirecord.

Every index i thus belongs to exactly one of the latter four types; we refer to this classification as the record classification. We write

$$\begin{aligned} \textrm{Rec}(\sigma ) \;=\; \{ i :\, \sigma (j)< \sigma (i) \hbox { for all } j < i \}, \end{aligned}$$
(3.3)

for the set of record indices and

$$\begin{aligned} \textrm{rec}(\sigma ) \;=\; |\textrm{Rec}(\sigma )|, \end{aligned}$$
(3.4)

for its cardinality, and likewise for antirecords.

The record and cycle classifications of indices are related as follows:

  1. (a)

    Every record is a weak excedance, and every exclusive record is an excedance.

  2. (b)

    Every antirecord is a weak anti-excedance, and every exclusive antirecord is an anti-excedance.

  3. (c)

    Every record-antirecord is a fixed point.

Therefore, by applying the record and cycle classifications simultaneously, we obtain 10 (not 20) disjoint categories [31]:

 

cpeak

cval

cdrise

cdfall

fix

erec

 

ereccval

ereccdrise

  

earec

eareccpeak

  

eareccdfall

 

rar

    

rar

nrar

nrcpeak

nrcval

nrcdrise

nrcdfall

nrfix

Clearly every index i belongs to exactly one of these 10 types; we call this the record-and-cycle classification. The corresponding sets are \(\textrm{Ereccval}= \textrm{Rec}\cap \textrm{Cval}\), etc.

3.2 Crossings and nestings

We now define (following [31]) some permutation statistics that count crossings and nestings.

First we associate to each permutation \(\sigma \in {\mathfrak {S}}_N\) a pictorial representation (Fig. 1) by placing vertices \(1,2,\ldots ,N\) along a horizontal axis and then drawing an arc from i to \(\sigma (i)\) above (resp. below) the horizontal axis in case \(\sigma (i) > i\) [resp. \(\sigma (i) < i\)]; if \(\sigma (i) = i\) we do not draw any arc.

Fig. 1
figure 1

Pictorial representation of the permutation \(\sigma = 9\,3\,7\,4\,6\,11\,2\,8\,10\,1\,5 = (1,9,10)\,(2,3,7)\,(4)\,(5,6,11)\,(8) \in {\mathfrak {S}}_{11}\)

Each vertex thus has either out-degree = in-degree = 1 (if it is not a fixed point) or out-degree = in-degree = 0 (if it is a fixed point). Of course, the arrows on the arcs are redundant, because the arrow on an arc above (resp. below) the axis always points to the right (resp. left); we therefore omit the arrows for simplicity.

We then say that a quadruplet \(i< j< k < l\) forms an

  • upper crossing (ucross) if \(k = \sigma (i)\) and \(l = \sigma (j)\);

  • lower crossing (lcross) if \(i = \sigma (k)\) and \(j = \sigma (l)\);

  • upper nesting (unest) if \(l = \sigma (i)\) and \(k = \sigma (j)\);

  • lower nesting (lnest) if \(i = \sigma (l)\) and \(j = \sigma (k)\).

We also consider some “degenerate” cases with \(j=k\), by saying that a triplet \(i< j < l\) forms an

  • upper joining (ujoin) if \(j = \sigma (i)\) and \(l = \sigma (j)\) [i.e. the index j is a cycle double rise];

  • lower joining (ljoin) if \(i = \sigma (j)\) and \(j = \sigma (l)\) [i.e. the index j is a cycle double fall];

  • upper pseudo-nesting (upsnest) if \(l = \sigma (i)\) and \(j = \sigma (j)\);

  • lower pseudo-nesting (lpsnest) if \(i = \sigma (l)\) and \(j = \sigma (j)\).

These are clearly degenerate cases of crossings and nestings, respectively. See Fig. 2. Note that \(\textrm{upsnest}(\sigma ) = \textrm{lpsnest}(\sigma )\) for all \(\sigma \), since for each fixed point j, the number of pairs (il) with \(i< j < l\) such that \(l = \sigma (i)\) has to equal the number of such pairs with \(i = \sigma (l)\); we therefore write these two statistics simply as

$$\begin{aligned} \textrm{psnest}(\sigma ) \;{\mathop {=}\limits ^\textrm{def}}\; \textrm{upsnest}(\sigma ) \;=\; \textrm{lpsnest}(\sigma ). \end{aligned}$$
(3.5)

And of course \(\textrm{ujoin}= \textrm{cdrise}\) and \(\textrm{ljoin}= \textrm{cdfall}\).

Fig. 2
figure 2

Crossing, nesting, joining and pseudo-nesting

We can further refine the four crossing/nesting categories by examining more closely the status of the inner index (j or k) whose outgoing arc belongs to the crossing or nesting: that is, j for an upper crossing or nesting, and k for a lower crossing or nesting:

 

ucross

unest

lcross

lnest

\(j\in \textrm{Cval}\)

ucrosscval

unestcval

  

\(j\in \textrm{Cdrise}\)

ucrosscdrise

unestcdrise

  

\(k\in \textrm{Cpeak}\)

  

lcrosscpeak

lnestcpeak

\(k\in \textrm{Cdfall}\)

  

lcrosscdfall

lnestcdfall

See Fig. 3. Please note that for the “upper” quantities the distinguished index (i.e. the one for which we examine both \(\sigma \) and \(\sigma ^{-1}\)) is in second position (j), while for the “lower” quantities the distinguished index is in third position (k).

Fig. 3
figure 3

Refined categories of crossing and nesting

In fact, a central role in our work will be played (just as in [2, 31]) by a refinement of these statistics: rather than counting the total numbers of quadruplets \(i< j< k < l\) that form upper (resp. lower) crossings or nestings, we will count the number of upper (resp. lower) crossings or nestings that use a particular vertex j (resp. k) in second (resp. third) position. More precisely, we define the index-refined crossing and nesting statistics

$$\begin{aligned} \textrm{ucross}(j,\sigma )= & \#\{ i<j<k<l :\, k = \sigma (i) \hbox { and } l = \sigma (j) \}, \end{aligned}$$
(3.6a)
$$\begin{aligned} \textrm{unest}(j,\sigma )= & \#\{ i<j<k<l :\, k = \sigma (j) \hbox { and } l = \sigma (i) \}, \end{aligned}$$
(3.6b)
$$\begin{aligned} \textrm{lcross}(k,\sigma )= & \#\{ i<j<k<l :\, i = \sigma (k) \hbox { and } j = \sigma (l) \}, \end{aligned}$$
(3.6c)
$$\begin{aligned} \textrm{lnest}(k,\sigma )= & \#\{ i<j<k<l :\, i = \sigma (l) \hbox { and } j = \sigma (k) \}. \end{aligned}$$
(3.6d)

Note that \(\textrm{ucross}(j,\sigma )\) and \(\textrm{unest}(j,\sigma )\) can be nonzero only when j is an excedance (that is, a cycle valley or a cycle double rise), while \(\textrm{lcross}(k,\sigma )\) and \(\textrm{lnest}(k,\sigma )\) can be nonzero only when k is an anti-excedance (that is, a cycle peak or a cycle double fall).

When j is a fixed point, we also define the analogous quantity for pseudo-nestings:

$$\begin{aligned} \textrm{psnest}(j,\sigma ) \;{\mathop {=}\limits ^\textrm{def}}\; \# \{i< j :\, \sigma (i)> j \} \;=\; \# \{i > j :\, \sigma (i) < j \} . \end{aligned}$$
(3.7)

(Here the two expressions are equal because \(\sigma \) is a bijection from \([1,j) \cup (j,n]\) to itself.) In [31, Eq. (2.20)] this quantity was called the level of the fixed point j and was denoted \(\textrm{lev}(j,\sigma )\).

4 First S-fraction for cycle-alternating permutations

We recall that a permutation \(\sigma \) is called cycle-alternating if it has no cycle double rises, cycle double falls, or fixed points; thus, each cycle of \(\sigma \) is of even length (call it 2m) and consists of m cycle valleys and m cycle peaks in alternation. We write \({\mathfrak {S}}^{\textrm{ca}}_{2n}\) for the set of cycle-alternating permutations of [2n].

4.1 First S-fraction (8 variables)

In [31, Sect. 2.15] the following 4-variable polynomials were introduced:

$$\begin{aligned} Q_n(x,y,u,v) \;=\; \sum _{\sigma \in {\mathfrak {S}}^{\textrm{ca}}_{2n}} x^{\textrm{eareccpeak}(\sigma )} y^{\textrm{ereccval}(\sigma )} u^{\textrm{nrcpeak}(\sigma )} v^{\textrm{nrcval}(\sigma )} , \end{aligned}$$
(4.1)

where

$$\begin{aligned} \textrm{eareccpeak}(\sigma ) \;=\; |\textrm{Eareccpeak}(\sigma )| \;=\; |\textrm{Arec}(\sigma ) \cap \textrm{Cpeak}(\sigma )|, \end{aligned}$$
(4.2)

and likewise for the others. It was then shown [31, Theorem 2.18] that the ordinary generating function of the polynomials \(Q_n\) has the S-type continued fraction

$$\begin{aligned} \sum _{n=0}^\infty Q_n(x,y,u,v) \, t^n \;=\; \frac{1}{1 - \frac{x y t}{1 - \frac{(x\!+\!u)(y\!+\!v) t}{1 - \frac{(x\!+\!2u)(y\!+\!2v) t}{1 - \cdots }}}}, \end{aligned}$$
(4.3)

with coefficients

$$\begin{aligned} \alpha _n \;=\; [x + (n-1)u] \, [y + (n-1)v] . \end{aligned}$$
(4.4)

We now generalize this by treating even and odd indices separately. That is, we define the polynomials

$$\begin{aligned} & \hspace{-6mm} Q_n(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},v_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},v_{\textrm{o}}) \;=\; \nonumber \\ & \qquad \sum _{\sigma \in {\mathfrak {S}}^{\textrm{ca}}_{2n}} x_{\textrm{e}}^{\textrm{eareccpeakeven}(\sigma )} y_{\textrm{e}}^{\textrm{ereccvaleven}(\sigma )} u_{\textrm{e}}^{\textrm{nrcpeakeven}(\sigma )} v_{\textrm{e}}^{\textrm{nrcvaleven}(\sigma )} \,\times \qquad \qquad \nonumber \\ & \qquad \qquad \;\, x_{\textrm{o}}^{\textrm{eareccpeakodd}(\sigma )} y_{\textrm{o}}^{\textrm{ereccvalodd}(\sigma )} u_{\textrm{o}}^{\textrm{nrcpeakodd}(\sigma )} v_{\textrm{o}}^{\textrm{nrcvalodd}(\sigma )} , \end{aligned}$$
(4.5)

where

$$\begin{aligned} \textrm{eareccpeakeven}(\sigma ) \;=\; |\textrm{Eareccpeakeven}(\sigma )| \;=\; |\textrm{Arec}(\sigma ) \cap \textrm{Cpeak}(\sigma ) \cap \textrm{Even}|,\nonumber \\ \end{aligned}$$
(4.6)

and likewise for the others. We then have:

Theorem 4.1

(First S-fraction for cycle-alternating permutations) The ordinary generating function of the polynomials \(Q_n(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},v_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},v_{\textrm{o}})\) has the S-type continued fraction

$$\begin{aligned} \sum _{n=0}^\infty Q_n(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},v_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},v_{\textrm{o}}) \, t^n \;=\; \frac{1}{1 - \frac{x_{\textrm{e}}y_{\textrm{o}}t}{1 - \frac{(x_{\textrm{o}}\!+\!u_{\textrm{o}})(y_{\textrm{e}}\!+\!v_{\textrm{e}}) t}{1 - \frac{(x_{\textrm{e}}\!+\!2u_{\textrm{e}})(y_{\textrm{o}}\!+\!2v_{\textrm{o}}) t}{1 - \cdots }}}},\nonumber \\ \end{aligned}$$
(4.7)

with coefficients

$$\begin{aligned} \alpha _{2k-1}= & [x_{\textrm{e}}+ (2k-2) u_{\textrm{e}}] \, [y_{\textrm{o}}+ (2k-2) v_{\textrm{o}}], \end{aligned}$$
(4.8a)
$$\begin{aligned} \alpha _{2k}= & [x_{\textrm{o}}+ (2k-1) u_{\textrm{o}}] \, [y_{\textrm{e}}+ (2k-1) v_{\textrm{e}}]. \end{aligned}$$
(4.8b)

The proof of this theorem is based on the “master” S-fraction for cycle-alternating permutations [31, Theorem 2.20] together with the following lemma:

Lemma 4.2

(Key lemma) If \(\sigma \) is a cycle-alternating permutation of [2n], then

$$\begin{aligned} \hbox {cycle valleys:}&\!\!&\textrm{ucross}(i,\sigma ) \,+\, \textrm{unest}(i,\sigma ) \;\equiv \; i-1 \, \pmod {2}, \end{aligned}$$
(4.9a)
$$\begin{aligned} \hbox {cycle peaks:}&\!\!&\textrm{lcross}(i,\sigma ) \,+\, \textrm{lnest}(i,\sigma ) \;\equiv \; i \, \pmod {2}, \end{aligned}$$
(4.9b)

for all \(i \in [2n]\).

Proof

In the Foata–Zeilberger bijection for permutations as presented in [31, Sect. 6.1], permutations \(\sigma \in {\mathfrak {S}}_N\) are mapped bijectively onto pairs \((\omega ,\xi )\), where \(\omega = (\omega _0,\ldots ,\omega _N)\) is a Motzkin path of length N, and \(\xi \) is a suitably defined set of integer labels \((\xi _1,\ldots ,\xi _N)\). We write \(h_i\) for the height of the Motzkin path after step i, i.e. \(\omega _i = (i, h_i)\). From [31, Eqs. (6.6)–(6.9)] and the definition of the steps \(s_i = h_i - h_{i-1}\), we get

$$\begin{aligned} \text {cval:} & \textrm{ucross}(i,\sigma ) \,+\, \textrm{unest}(i,\sigma ) \;=\; h_{i-1} \;=\; h_i - 1, \end{aligned}$$
(4.10a)
$$\begin{aligned} \text {cdrise:} & \textrm{ucross}(i,\sigma ) \,+\, \textrm{unest}(i,\sigma ) \;=\; h_{i-1} - 1 \;=\; h_i - 1, \end{aligned}$$
(4.10b)
$$\begin{aligned} \text {cpeak:} & \textrm{lcross}(i,\sigma ) \,+\, \textrm{lnest}(i,\sigma ) \;=\; h_{i-1} - 1 \;=\; h_i, \end{aligned}$$
(4.10c)
$$\begin{aligned} \text {cdfall:} & \textrm{lcross}(i,\sigma ) \,+\, \textrm{lnest}(i,\sigma ) \;=\; h_{i-1} - 1 \;=\; h_i - 1. \end{aligned}$$
(4.10d)

On the other hand, for a cycle-alternating permutation, the path \(\omega \) is a Dyck path (i.e. there are no level steps), so that \(h_i \equiv i \pmod {2}\). \(\square \)

We now apply the first master S-fraction for cycle-alternating permutations [31, Theorem 2.20], which states that the polynomials

$$\begin{aligned} Q_n({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}}) \;=\; \sum _{\sigma \in {\mathfrak {S}}^{\textrm{ca}}_{2n}} \;\, \prod \limits _{i \in \textrm{Cval}} \! {\textsf{a}}_{\textrm{ucross}(i,\sigma ),\,\textrm{unest}(i,\sigma )} \prod \limits _{i \in \textrm{Cpeak}} \!\! {\textsf{b}}_{\textrm{lcross}(i,\sigma ),\,\textrm{lnest}(i,\sigma )},\nonumber \\ \end{aligned}$$
(4.11)

in indeterminates \({{\textsf {{\textbf {a}}}}}= ({\textsf{a}}_{\ell ,\ell '})_{\ell ,\ell ' \ge 0}\) and \({{\textsf {{\textbf {b}}}}}= ({\textsf{b}}_{\ell ,\ell '})_{\ell ,\ell ' \ge 0}\) have the S-type continued fraction

$$\begin{aligned} \sum _{n=0}^\infty Q_n({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}}) \, t^n \;=\; \frac{1}{1 - \frac{{\textsf{a}}_{00} {\textsf{b}}_{00} t}{1 - \frac{({\textsf{a}}_{01} + {\textsf{a}}_{10})({\textsf{b}}_{01} + {\textsf{b}}_{10}) t}{1 - \frac{({\textsf{a}}_{02} + {\textsf{a}}_{11} + {\textsf{a}}_{20})({\textsf{b}}_{02} + {\textsf{b}}_{11} + {\textsf{b}}_{20}) t}{1 - \cdots }}}},\nonumber \\ \end{aligned}$$
(4.12)

with coefficients

$$\begin{aligned} \alpha _n \;=\; \biggl ( \sum _{\ell =0}^{n-1} {\textsf{a}}_{\ell ,n-1-\ell } \biggr ) \biggl ( \sum _{\ell =0}^{n-1} {\textsf{b}}_{\ell ,n-1-\ell } \biggr ). \end{aligned}$$
(4.13)

We also use the following general fact about permutations

Lemma 4.3

([31, Lemma 2.10]) Let \(\sigma \) be a permutation.

  1. (a)

    If i is a cycle valley or cycle double rise, then i is a record if and only if \(\textrm{unest}(i,\sigma ) = 0\); and in this case it is an exclusive record.

  2. (b)

    If i is a cycle peak or cycle double fall, then i is an antirecord if and only if \(\textrm{lnest}(i,\sigma ) = 0\); and in this case it is an exclusive antirecord.

Applying Lemma 4.3 to cycle valleys and peaks in a cycle-alternating permutation, it follows that the polynomials \(Q_n(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},v_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},v_{\textrm{o}})\) are obtained by specializing \(Q_n({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}})\) to

$$\begin{aligned} {\textsf{a}}_{\ell ,\ell '}= & {\left\{ \begin{array}{ll} y_{\textrm{o}}& \text {if}\ \ell ' = 0 \ \text {and}\ \ell +\ell ' \ \hbox {is even} \\ v_{\textrm{o}}& \text {if}\ \ell ' \ge 1\ \hbox {and}\ \ell +\ell ' \ \hbox {is even} \\ y_{\textrm{e}}& \text {if} \ \ell ' = 0 \ \hbox {and} \ \ell +\ell ' \ \hbox {is odd} \\ v_{\textrm{e}}& \text {if} \ \ell ' \ge 1 \ \hbox {and}\ \ell +\ell ' \ \hbox {is odd} \end{array}\right. }, \end{aligned}$$
(4.14a)
$$\begin{aligned} {\textsf{b}}_{\ell ,\ell '}= & {\left\{ \begin{array}{ll} x_{\textrm{e}}& \text {if }\ \ell ' = 0\ \text { and }\ \ell +\ell '\ \hbox { is even} \\ u_{\textrm{e}}& \text {if }\ \ell ' \ge 1\ \text { and }\ \ell +\ell '\ \hbox { is even} \\ x_{\textrm{o}}& \text {if }\ \ell ' = 0\ \text { and }\ \ell +\ell '\ \hbox { is odd} \\ u_{\textrm{o}}& \text {if }\ \ell ' \ge 1\ \text { and }\ \ell +\ell '\ \hbox { is odd} \end{array}\right. }. \end{aligned}$$
(4.14b)

Inserting these into (4.13) yields (4.8). This completes the proof of Theorem 4.1.

Remark 1

1. If we specialize Theorem 4.1 to \(u_{\textrm{e}}= x_{\textrm{e}}\), \(u_{\textrm{o}}= x_{\textrm{o}}\), \(y_{\textrm{e}}= v_{\textrm{e}}= y_{\textrm{o}}= v_{\textrm{o}}= 1\), we obtain an S-fraction with coefficients \(\alpha _{2k-1} = (2k-1)^2 x_{\textrm{e}}\), \(\alpha _{2k} = (2k)^2 x_{\textrm{o}}\). This is the S-fraction for the polynomials \({\mathcal {E}}_{2n}(x_{\textrm{e}},x_{\textrm{o}})\), which generalize the secant numbers \(E_{2n}\) as follows: Start from the Jacobian elliptic functions \(\textrm{sn}\), \(\textrm{cn}\), \(\textrm{dn}\) in Dumont’s [10] symmetric parametrization, which are defined by the system of differential equations

$$\begin{aligned} {d \over du} \, \textrm{sn}(u;a,b)= & \textrm{cn}(u;a,b) \, \textrm{dn}(u;a,b), \end{aligned}$$
(4.15a)
$$\begin{aligned} {d \over du} \, \textrm{cn}(u;a,b)= & a^2 \, \textrm{dn}(u;a,b) \, \textrm{sn}(u;a,b), \end{aligned}$$
(4.15b)
$$\begin{aligned} {d \over du} \, \textrm{dn}(u;a,b)= & b^2 \, \textrm{sn}(u;a,b) \, \textrm{cn}(u;a,b), \end{aligned}$$
(4.15c)

with the initial conditions \(\textrm{sn}(0;a,b) = 0\), \(\textrm{cn}(0;a,b) = 1\), \(\textrm{dn}(0;a,b) = 1\). Note the special cases

$$\begin{aligned} \textrm{sn}(u;a,0)= & {\sinh au \over a}, \end{aligned}$$
(4.16a)
$$\begin{aligned} \textrm{cn}(u;a,0)= & \cosh au, \end{aligned}$$
(4.16b)
$$\begin{aligned} \textrm{dn}(u;a,0)= & 1, \end{aligned}$$
(4.16c)

and

$$\begin{aligned} \textrm{sn}(u;a,a)= & {\tan au \over a}, \end{aligned}$$
(4.17a)
$$\begin{aligned} \textrm{cn}(u;a,a)= & \sec au, \end{aligned}$$
(4.17b)
$$\begin{aligned} \textrm{dn}(u;a,a)= & \sec au. \end{aligned}$$
(4.17c)

Thus, \(\textrm{sn}\) is a simultaneous generalization of tangent and hyperbolic sine, while \(\textrm{cn}\) is a simultaneous generalization of secant and hyperbolic cosine. The Taylor expansions around \(u=0\) have the form

$$\begin{aligned} \textrm{cn}(u;a,b)= & \sum _{n=0}^\infty {\mathcal {E}}_{2n}(a^2,b^2) \, {u^{2n} \over (2n)!}, \end{aligned}$$
(4.18)
$$\begin{aligned} \textrm{sn}(u;a,b)= & \sum _{n=0}^\infty {\mathcal {E}}_{2n+1}(a^2,b^2) \, {u^{2n+1} \over (2n+1)!}, \end{aligned}$$
(4.19)

where \({\mathcal {E}}_{2n}(\alpha ,\beta )\) and \({\mathcal {E}}_{2n+1}(\alpha ,\beta )\) are homogeneous polynomials of degree n in the indeterminates \(\alpha \) and \(\beta \), with nonnegative integer coefficients. Then the ordinary generating function of the polynomials \({\mathcal {E}}_{2n}\) can be expressed as an S-fraction

$$\begin{aligned} \sum _{n=0}^\infty t^n \, {\mathcal {E}}_{2n}(\alpha ,\beta ) \;=\; \frac{1}{1 - \frac{1^2 \alpha \, t}{1 - \frac{2^2 \beta \, t}{1 - \frac{3^2 \alpha \, t}{1- \cdots }}}}, \end{aligned}$$
(4.20)

with coefficients

$$\begin{aligned} \alpha _{2k-1}= & (2k-1)^2 \, \alpha , \end{aligned}$$
(4.21a)
$$\begin{aligned} \alpha _{2k}= & (2k)^2 \, \beta . \end{aligned}$$
(4.21b)

This S-fraction goes back to Stieltjes [34, p. H17] and Rogers [26, p. 77]; modern presentations of Rogers’ elegant proof can be found in Flajolet and Françon [16, Theorem 1] and Milne [22, Theorems 3.2, 3.11]. The polynomials \({\mathcal {E}}_{2n}(\alpha ,\beta )\) are also specializations of the three-variable Schett polynomials [9,10,11, 27, 28] \(X_{2n}(x,y,z)\), for which Dumont [9,10,11] has provided a combinatorial interpretation in terms of even and odd cycle peaks in permutations of [2n]. When specialized to \(z=0\), one obtains cycle-alternating permutations, and Dumont’s interpretation agrees with ours. The continued fraction (4.20) can be found on [11, p. 38].

2. The continued fraction of Theorem 4.1, specialized to \(x_e = u_e = v_e = x_o = u_o = v_0 = 1\), enumerates cycle-alternating permutations of [2n] with respect to odd and even records, and has coefficients \(\alpha _{2k-1} = (2k-1)(2k-2 + y_{\textrm{o}})\), \(\alpha _{2k} = (2k)(2k-1+y_{\textrm{e}})\). This same continued fraction was found by Randrianarivony and Zeng [25, Théorème 3] as enumerating even and odd record values in alternating (not cycle-alternating) permutations. This is a “linear statistics” analogue of our “cyclic statistics” results.

4.2 \({\varvec{p,q}}\)-generalization of first S-fraction (16 variables)

We can further extend Theorem 4.1 by introducing a pq-generalization. The statistics on permutations corresponding to the variables p and q will be crossings and nestings, as defined in Sect. 3.2.

Recall first that for an integer \(n \ge 0\) we define

$$\begin{aligned} [n]_{p,q} \;=\; {p^n - q^n \over p-q} \;=\; \sum \limits _{j=0}^{n-1} p^j q^{n-1-j}, \end{aligned}$$
(4.22)

where p and q are indeterminates; it is a homogeneous polynomial of degree \(n-1\) in p and q, which is symmetric in p and q. In particular, \([0]_{p,q} = 0\) and \([1]_{p,q} = 1\); and for \(n \ge 1\) we have the recurrence

$$\begin{aligned} [n]_{p,q} \;=\; p \, [n-1]_{p,q} \,+\, q^{n-1} \;=\; q \, [n-1]_{p,q} \,+\, p^{n-1} . \end{aligned}$$
(4.23)

If \(p=1\), then \([n]_{1,q}\) is the well-known q-integer

$$\begin{aligned} [n]_q \;=\; [n]_{1,q} \;=\; {1 - q^n \over 1-q} \;=\; {\left\{ \begin{array}{ll} 0 & \hbox { if}\ n=0 \\ 1+q+q^2+\cdots +q^{n-1} & \hbox { if}\ n \ge 1 \end{array}\right. }. \end{aligned}$$
(4.24)

If \(p=0\), then

$$\begin{aligned} [n]_{0,q} \;=\; {\left\{ \begin{array}{ll} 0 & \hbox { if}\ n=0 \\ q^{n-1} & \hbox { if}\ n \ge 1 \end{array}\right. }. \end{aligned}$$
(4.25)

In [31, Sect. 2.15] the following 8-variable polynomials were introduced:

$$\begin{aligned} & Q_{n}(x,y,u,v,p_{+},p_{-},q_{+},q_{-}) \;=\; \nonumber \\ & \qquad \qquad \sum _{\sigma \in {\mathfrak {S}}^{\textrm{ca}}_{2n}} x^{\textrm{eareccpeak}(\sigma )} y^{\textrm{ereccval}(\sigma )} u^{\textrm{nrcpeak}(\sigma )} v^{\textrm{nrcval}(\sigma )} \,\times \qquad \qquad \nonumber \\ & \qquad \qquad \qquad \;\, p_{-}^{\textrm{lcrosscpeak}(\sigma )} p_{+}^{\textrm{ucrosscval}(\sigma )} q_{-}^{\textrm{lnestcpeak}(\sigma )} q_{+}^{\textrm{unestcval}(\sigma )}. \end{aligned}$$
(4.26)

It was then shown [31, Theorem 2.19] that the ordinary generating function of the polynomials \(Q_n\) has the S-type continued fraction

$$\begin{aligned} & \hspace{-2cm} \sum _{n=0}^\infty Q_{n}(x,y,u,v,p_{+},p_{-},q_{+},q_{-}) \; t^n \;=\; \nonumber \\ & \!\!\!\! \frac{1}{1 - \frac{x y t}{1 - \frac{(p_{-} x\!+\! q_{-} u)(p_{+} y\!+\! q_{+} v) t}{1 - \frac{(p_{-}^2 x\!+\! q_{-} [2]_{p_{-},q_{-}} u)(p_{+}^2 y\!+\! q_{+} [2]_{p_{+},q_{+}} v) t}{1 - \cdots }}}}, \end{aligned}$$
(4.27)

with coefficients

$$\begin{aligned} \alpha _n \;=\; (p_{-}^{n-1} x + q_{-} \, [n-1]_{p_{-},q_{-}} u) \, (p_{+}^{n-1} y + q_{+} \, [n-1]_{p_{+},q_{+}} v) . \end{aligned}$$
(4.28)

We now generalize this by treating even and odd indices separately. That is, we define the polynomials

$$\begin{aligned} & \hspace{-6mm} Q_n(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},v_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},v_{\textrm{o}},p_{-1},p_{-2},p_{+1},p_{+2},q_{-1},q_{-2},q_{+1},q_{+2}) \nonumber \\ & \quad = \sum _{\sigma \in {\mathfrak {S}}^{\textrm{ca}}_{2n}} x_{\textrm{e}}^{\textrm{eareccpeakeven}(\sigma )} y_{\textrm{e}}^{\textrm{ereccvaleven}(\sigma )} u_{\textrm{e}}^{\textrm{nrcpeakeven}(\sigma )} v_{\textrm{e}}^{\textrm{nrcvaleven}(\sigma )} \, \nonumber \\ & \qquad \times \;\, x_{\textrm{o}}^{\textrm{eareccpeakodd}(\sigma )} y_{\textrm{o}}^{\textrm{ereccvalodd}(\sigma )} u_{\textrm{o}}^{\textrm{nrcpeakodd}(\sigma )} v_{\textrm{o}}^{\textrm{nrcvalodd}(\sigma )} \, \nonumber \\ & \qquad \times \;\, p_{-1}^{\textrm{lcrosscpeakeven}(\sigma )} p_{-2}^{\textrm{lcrosscpeakodd}(\sigma )} p_{+1}^{\textrm{ucrosscvalodd}(\sigma )} p_{+2}^{\textrm{ucrosscvaleven}(\sigma )} \, \nonumber \\ & \qquad \times \;\, q_{-1}^{\textrm{lnestcpeakeven}(\sigma )} q_{-2}^{\textrm{lnestcpeakodd}(\sigma )} q_{+1}^{\textrm{unestcvalodd}(\sigma )} q_{+2}^{\textrm{unestcvaleven}(\sigma )} , \end{aligned}$$
(4.29)

where

$$\begin{aligned} \textrm{lcrosscpeakeven}(\sigma ) \;=\; \sum _{j\in \textrm{Cpeak}(\sigma ) \cap \textrm{Even}} \textrm{lcross}(j,\sigma ), \end{aligned}$$
(4.30)

and likewise for the others. We then have:

Theorem 4.4

(First S-fraction for cycle-alternating permutations, pq-generalization) The ordinary generating function of the polynomials (4.29) has the S-type continued fraction

$$\begin{aligned} \sum _{n=0}^\infty Q_n(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},v_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},v_{\textrm{o}},p_{-1},p_{-2},p_{+1},p_{+2},q_{-1},q_{-2},q_{+1},q_{+2}) \, t^n\nonumber \\ \;=\; \frac{1}{1 - \frac{x_{\textrm{e}}y_{\textrm{o}}t}{1 - \frac{(p_{-2}x_{\textrm{o}}\!+\!q_{-2}u_{\textrm{o}})(p_{+2}y_{\textrm{e}}\!+\!q_{+2}v_{\textrm{e}}) t}{1 - \frac{(p_{-1}^2x_{\textrm{e}}\!+\!q_{-1}[2]_{p_{-1},q_{-1}}u_{\textrm{e}})(p_{+1}^2y_{\textrm{o}}\!+\!q_{+1}[2]_{p_{+1},q_{+1}}v_{\textrm{o}}) t}{1 - \cdots }}}},\nonumber \\ \end{aligned}$$
(4.31a)

with coefficients

$$\begin{aligned} \alpha _{2k-1}= & (p_{-1}^{2k-2}x_{\textrm{e}}+ q_{-1}[2k-2]_{p_{-1},q_{-1}} u_{\textrm{e}}) \, (p_{+1}^{2k-2}y_{\textrm{o}}+ q_{+1}[2k-2]_{p_{+1},q_{+1}} v_{\textrm{o}}), \end{aligned}$$
(4.32a)
$$\begin{aligned} \alpha _{2k}= & (p_{-2}^{2k-1}x_{\textrm{o}}+ q_{-2}[2k-1]_{p_{-2},q_{-2}} u_{\textrm{o}}) \, (p_{+2}^{2k-1}y_{\textrm{e}}+ q_{+2}[2k-1]_{p_{+2},q_{+2}} v_{\textrm{e}}). \nonumber \\ \end{aligned}$$
(4.32b)

Proof

Notice that we obtain the polynomials (4.29) by specializing the polynomials \(Q_n({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}})\) defined in (4.11) to

$$\begin{aligned} {\textsf{a}}_{\ell ,\ell '}= & {\left\{ \begin{array}{ll} p_{+1}^{\ell } y_{\textrm{o}}& \text {if} \ \ell ' = 0 \ \hbox {and} \ \ell +\ell ' \ \hbox {is even} \\ p_{+1}^{\ell } q_{+1}^{\ell '}v_{\textrm{o}}& \text {if} \ \ell ' \ge 1 \ \hbox {and}\ \ell +\ell '\ \hbox { is even} \\ p_{+2}^{\ell } y_{\textrm{e}}& \text {if} \ \ell ' = 0\ \hbox {and} \ \ell +\ell ' \ \hbox { is odd} \\ p_{+2}^{\ell } q_{+2}^{\ell '}v_{\textrm{e}}& \text {if} \ \ell ' \ge 1\ \hbox {and} \ \ell +\ell '\ \hbox {is odd} \end{array}\right. }, \end{aligned}$$
(4.33a)
$$\begin{aligned} {\textsf{b}}_{\ell ,\ell '}= & {\left\{ \begin{array}{ll} p_{-1}^{\ell } x_{\textrm{e}}& \text {if} \ \ell ' = 0 \ \hbox { and} \ \ell +\ell ' \ \hbox { is even} \\ p_{-1}^{\ell } q_{-1}^{\ell '}u_{\textrm{e}}& \text {if} \ \ell ' \ge 1 \ \hbox { and} \ \ell +\ell ' \ \hbox {is even} \\ p_{-2}^{\ell } x_{\textrm{o}}& \text {if} \ \ell ' = 0 \ \hbox { and} \ \ell +\ell ' \ \hbox {is odd} \\ p_{-2}^{\ell } q_{-2}^{\ell '}u_{\textrm{o}}& \text {if} \ \ell ' \ge 1 \ \hbox {and} \ \ell +\ell ' \ \hbox {is odd} \end{array}\right. }. \end{aligned}$$
(4.33b)

Inserting these into (4.13) yields (4.32b). This along with Lemma 4.2 completes the proof of Theorem 4.4. \(\square \)

Remark 2

We can also obtain Biane’s [1, Sect. 6] S-fraction for the q-secant numbers \(E_{2n}(q)\), defined as counting cycle-alternating permutations by number of inversions. We recall [31, Proposition 2.24] that the number of inversions in a permutation \(\sigma \) satisfies

$$\begin{aligned} \textrm{inv}\;=\; \textrm{cval}+ \textrm{cdrise}+ \textrm{cdfall}+ \textrm{ucross}+ \textrm{lcross}+ 2(\textrm{unest}+ \textrm{lnest}+ \textrm{psnest}).\nonumber \\ \end{aligned}$$
(4.34)

For a cycle-alternating permutation we have \(\textrm{cdrise}= \textrm{cdfall}= \textrm{psnest}= 0\). Evaluating (4.26) with \(x=u=1\), \(y=v=q\), \(p_- = p_+ = q\) and \(q_- = q_+ = q^2\) and using (4.27)/ (4.28), we obtain after a bit of algebra \(\alpha _n = q^{2n-1} [n]_q^2\), which agrees with Biane’s formula.

5 Second S-fraction for cycle-alternating permutations

5.1 Second S-fraction (counting of cycles)

It is now natural to want to generalize the foregoing polynomials by introducing also the counting of cycles. That is, we define the polynomials

$$\begin{aligned} & \hspace{-6mm} \widehat{Q}_n(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},v_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},v_{\textrm{o}},\lambda ) \nonumber \\ & \quad = \sum _{\sigma \in {\mathfrak {S}}^{\textrm{ca}}_{2n}} x_{\textrm{e}}^{\textrm{eareccpeakeven}(\sigma )} y_{\textrm{e}}^{\textrm{ereccvaleven}(\sigma )} u_{\textrm{e}}^{\textrm{nrcpeakeven}(\sigma )} v_{\textrm{e}}^{\textrm{nrcvaleven}(\sigma )} \, \nonumber \\ & \qquad \times x_{\textrm{o}}^{\textrm{eareccpeakodd}(\sigma )} y_{\textrm{o}}^{\textrm{ereccvalodd}(\sigma )} u_{\textrm{o}}^{\textrm{nrcpeakodd}(\sigma )} v_{\textrm{o}}^{\textrm{nrcvalodd}(\sigma )} \lambda ^{\textrm{cyc}(\sigma )} , \end{aligned}$$
(5.1)

which generalize the polynomials (4.5) by including a factor \(\lambda ^{\textrm{cyc}(\sigma )}\).

Unfortunately, it is not possible to obtain an S-fraction (or even a J-fraction) with polynomial coefficients for (5.1). Indeed, it is not possible to obtain a J-fraction with polynomial coefficients even for the 3-variable specialization

$$\begin{aligned} & P_n(x,y,\lambda ) \;=\; \sum _{\sigma \in {\mathfrak {S}}^{\textrm{ca}}_{2n}} x^{\textrm{eareccpeak}(\sigma )} y^{\textrm{ereccval}(\sigma )} \lambda ^{\textrm{cyc}(\sigma )}. \end{aligned}$$
(5.2)

We show this in the Appendix.

However, it is possible to obtain a nice S-fraction for the polynomials (5.1) if we make the specializations \(y_{\textrm{e}}=v_{\textrm{e}}\) and \(y_{\textrm{o}}=v_{\textrm{o}}\):

Theorem 5.1

(Second S-fraction for cycle-alternating permutations) The ordinary generating function of the polynomials \(\widehat{Q}_n(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},v_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},v_{\textrm{o}},\lambda )\) with the specializations \(y_{\textrm{e}}=v_{\textrm{e}}\) and \(y_{\textrm{o}}=v_{\textrm{o}}\) has the S-type continued fraction

$$\begin{aligned} \sum _{n=0}^\infty \widehat{Q}_n(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},y_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},y_{\textrm{o}},\lambda ) \, t^n \;=\; \frac{1}{1 - \frac{\lambda x_{\textrm{e}}y_{\textrm{o}}t}{1 - \frac{(\lambda \!+\! 1)(x_{\textrm{o}}\!+\!u_{\textrm{o}})y_{\textrm{e}}t}{1 - \frac{(\lambda \!+\! 2)(x_{\textrm{e}}\!+\!2u_{\textrm{e}})y_{\textrm{o}}t}{1 - \cdots }}}},\nonumber \\ \end{aligned}$$
(5.3)

with coefficients

$$\begin{aligned} \alpha _{2k-1}= & (\lambda +2k-2) \, [x_{\textrm{e}}+ (2k-2) u_{\textrm{e}}] \, y_{\textrm{o}}, \end{aligned}$$
(5.4a)
$$\begin{aligned} \alpha _{2k}= & (\lambda +2k-1) \,[x_{\textrm{o}}+ (2k-1) u_{\textrm{o}}] \, y_{\textrm{e}}. \end{aligned}$$
(5.4b)

This generalizes [31, Theorem 2.21] by treating even and odd indices separately.

The proof of Theorem 5.1 will be obtained as a specialization of Theorem 5.2.

When \(x_{\textrm{e}}=y_{\textrm{e}}=u_{\textrm{e}}=v_{\textrm{e}}=x_{\textrm{o}}=y_{\textrm{o}}=u_{\textrm{o}}=v_{\textrm{o}}=1\), the polynomials \(\widehat{Q}_n\) reduce to the secant power polynomials \(E_{2n}(\lambda )\), as will be shown in Sect. 6.3.

5.2 \({\varvec{p,q}}\)-generalization of second S-fraction

We now introduce a pq-generalization of (5.1):

$$\begin{aligned} & \hspace{-6mm} \widehat{Q}_n(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},v_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},v_{\textrm{o}},p_{-1},p_{-2},p_{+1},p_{+2},q_{-1},q_{-2},q_{+1}, q_{+2},\lambda ) \nonumber \\ & \quad = \sum _{\sigma \in {\mathfrak {S}}^{\textrm{ca}}_{2n}} x_{\textrm{e}}^{\textrm{eareccpeakeven}(\sigma )} y_{\textrm{e}}^{\textrm{ereccvaleven}(\sigma )} u_{\textrm{e}}^{\textrm{nrcpeakeven}(\sigma )} v_{\textrm{e}}^{\textrm{nrcvaleven}(\sigma )} \, \nonumber \\ & \qquad \times \;\, x_{\textrm{o}}^{\textrm{eareccpeakodd}(\sigma )} y_{\textrm{o}}^{\textrm{ereccvalodd}(\sigma )} u_{\textrm{o}}^{\textrm{nrcpeakodd}(\sigma )} v_{\textrm{o}}^{\textrm{nrcvalodd}(\sigma )} \, \nonumber \\ & \qquad \times \;\, p_{-1}^{\textrm{lcrosscpeakeven}(\sigma )} p_{-2}^{\textrm{lcrosscpeakodd}(\sigma )} p_{+1}^{\textrm{ucrosscvalodd}(\sigma )} p_{+2}^{\textrm{ucrosscvaleven}(\sigma )} \, \nonumber \\ & \qquad \times \;\, q_{-1}^{\textrm{lnestcpeakeven}(\sigma )} q_{-2}^{\textrm{lnestcpeakodd}(\sigma )} q_{+1}^{\textrm{unestcvalodd}(\sigma )} q_{+2}^{\textrm{unestcvaleven}(\sigma )} \lambda ^{\textrm{cyc}(\sigma )}.\nonumber \\ \end{aligned}$$
(5.5)

We then have:

Theorem 5.2

(Second S-fraction for cycle-alternating permutations, pq-generalization) The ordinary generating function of the polynomials (5.5) with the specializations \(y_{\textrm{e}}=v_{\textrm{e}}\), \(y_{\textrm{o}}=v_{\textrm{o}}\), \(p_{+1} = q_{+1}\) and \(p_{+2}=q_{+2}\) has the S-type continued fraction

$$\begin{aligned} & \sum _{n=0}^\infty \widehat{Q}_n(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},y_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},y_{\textrm{o}},p_{-1},p_{-2},p_{+1},p_{+2},q_{-1},q_{-2},p_{+1},p_{+2},\lambda ) \, t^n \qquad \nonumber \\ & \hspace{1cm} =\; \frac{1}{1 - \frac{\lambda x_{\textrm{e}}y_{\textrm{o}}t}{1 - \frac{(\lambda +1)(p_{-2}x_{\textrm{o}}\!+\!q_{-2}u_{\textrm{o}})p_{+2}y_{\textrm{e}}t}{1 - \frac{(\lambda +2)(p_{-1}^2x_{\textrm{e}}\!+\!q_{-1}[2]_{p_{-1},q_{-1}}u_{\textrm{e}})p_{+1}^2y_{\textrm{o}}t}{1 - \cdots }}}}, \end{aligned}$$
(5.6)

with coefficients

$$\begin{aligned} \alpha _{2k-1}= & (\lambda +2k-2)\,(p_{-1}^{2k-2}x_{\textrm{e}}+ q_{-1}[2k-2]_{p_{-1},q_{-1}} u_{\textrm{e}}) \, p_{+1}^{2k-2}y_{\textrm{o}}, \end{aligned}$$
(5.7a)
$$\begin{aligned} \alpha _{2k}= & (\lambda +2k-1)\,(p_{-2}^{2k-1}x_{\textrm{o}}+ q_{-2}[2k-1]_{p_{-2},q_{-2}} u_{\textrm{o}}) \, p_{+2}^{2k-1}y_{\textrm{e}}. \end{aligned}$$
(5.7b)

This generalizes [31, Theorem 2.22] by treating even and odd indices separately.

The proof of this theorem (and thus also of Theorem 5.1) will be based on the “second master” S-fraction for cycle-alternating permutations [31, Theorem 2.23] together with Lemma 4.2. We first recall that second master S-fraction: it states that the polynomials

$$\begin{aligned} \widehat{Q}_n({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}},\lambda ) \;=\; \sum _{\sigma \in {\mathfrak {S}}^{\textrm{ca}}_{2n}} \;\,\lambda ^{\textrm{cyc}(\sigma )} \prod \limits _{i \in \textrm{Cval}} \! {\textsf{a}}_{\textrm{ucross}(i,\sigma )\,+\,\textrm{unest}(i,\sigma )} \prod \limits _{i \in \textrm{Cpeak}} \!\! {\textsf{b}}_{\textrm{lcross}(i,\sigma ),\,\textrm{lnest}(i,\sigma )}\nonumber \\ \end{aligned}$$
(5.8)

in indeterminates \({{\textsf {{\textbf {a}}}}}= ({\textsf{a}}_{\ell })_{\ell \ge 0}\) and \({{\textsf {{\textbf {b}}}}}= ({\textsf{b}}_{\ell ,\ell '})_{\ell ,\ell ' \ge 0}\) have the S-type continued fraction

$$\begin{aligned} \sum _{n=0}^\infty \widehat{Q}_n({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}},\lambda ) \, t^n \;=\; \frac{1}{1 - \frac{\lambda {\textsf{a}}_{0} {\textsf{b}}_{00} t}{1 - \frac{(\lambda + 1){\textsf{a}}_{1} ({\textsf{b}}_{01} + {\textsf{b}}_{10}) t}{1 - \frac{(\lambda + 2){\textsf{a}}_{2}({\textsf{b}}_{02} + {\textsf{b}}_{11} + {\textsf{b}}_{20}) t}{1 - \cdots }}}}, \end{aligned}$$
(5.9)

with coefficients

$$\begin{aligned} \alpha _n \;=\; (\lambda + n-1) {\textsf{a}}_{n-1} \biggl ( \sum _{\ell =0}^{n-1} {\textsf{b}}_{\ell ,n-1-\ell } \biggr ). \end{aligned}$$
(5.10)

Notice that, in contrast to (4.11), the indeterminates \({{\textsf {{\textbf {a}}}}}\) now have only one index: we are unable to count \(\textrm{ucross}\) and \(\textrm{unest}\) separately, but can only count their sum. This is the price we pay for being able to count cycles.

Proof of Theorem 5.2

Notice that we obtain the polynomials (5.5) by specializing the polynomials \(\widehat{Q}_n({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}},\lambda )\) defined in (5.8) to

$$\begin{aligned} {\textsf{a}}_{\ell }= & {\left\{ \begin{array}{ll} p_{+1}^{\ell } y_{\textrm{o}}& \text {if} \ \ell \ \hbox {is even} \\ p_{+2}^{\ell } y_{\textrm{e}}& \text {if} \ \ell \ \hbox {is odd} \end{array}\right. }, \end{aligned}$$
(5.11a)
$$\begin{aligned} {\textsf{b}}_{\ell ,\ell '}= & {\left\{ \begin{array}{ll} p_{-1}^{\ell } x_{\textrm{e}}& \text {if} \ \ell ' = 0 \ \hbox {and} \ \ell +\ell ' \ \hbox {is even} \\ p_{-1}^{\ell } q_{-1}^{\ell '}u_{\textrm{e}}& \text {if} \ \ell ' \ge 1 \ \hbox {and} \ \ell +\ell ' \ \hbox {is even} \\ p_{-2}^{\ell } x_{\textrm{o}}& \text {if} \ \ell ' = 0 \ \hbox {and} \ \ell +\ell ' \ \hbox { is odd} \\ p_{-2}^{\ell } q_{-2}^{\ell '}u_{\textrm{o}}& \text {if} \ \ell ' \ge 1 \ \hbox {and } \ \ell +\ell ' \ \hbox {is odd} \end{array}\right. }. \end{aligned}$$
(5.11b)

Inserting these into (5.10) yields (5.7). This along with Lemma 4.2 completes the proof of Theorem 5.2. \(\square \)

Proof of Theorem 5.1

Specialize Theorem 5.2 to \(p_{+1}=p_{+2}=p_{-1}=p_{-2}=q_{-1}=q_{-2} = 1\). \(\square \)

5.3 Alternating cycles

Let \({\mathfrak {C}}_N \subseteq {\mathfrak {S}}_N\) denote the set of permutations of [N] consisting of exactly one cycle. Then let \({{\mathcal {A}}\mathfrak {C}}_{2n} = {\mathfrak {C}}_{2n} \cap {\mathfrak {S}}_{2n}^{\textrm{ca}}\) denote the set of cycle-alternating permutations of [2n] consisting of exactly one cycle, or alternating cycles for short. Dumont [11, Sect. 3, p. 40] showed that alternating cycles are enumerated by the down-shifted tangent numbers, i.e. \(|{{\mathcal {A}}\mathfrak {C}}_{2n}| = E_{2n-1}\). Here we will recover this result, and extend it to a more refined S-fraction.

We can enumerate alternating cycles by extracting the coefficient of \(\lambda ^1\) in the preceding results (namely, Theorems 5.1, 5.2 and Eq. (5.9)). We begin by defining the polynomials analogous to (4.5), (4.29) and (5.8) but restricted to alternating cycles:

$$\begin{aligned} & Q_n^{{\mathcal {A}}\mathfrak {C}}(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},v_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},v_{\textrm{o}}) \nonumber \\ & \quad = \sum _{\sigma \in {{\mathcal {A}}\mathfrak {C}}_{2n}} x_{\textrm{e}}^{\textrm{eareccpeakeven}(\sigma )} y_{\textrm{e}}^{\textrm{ereccvaleven}(\sigma )} u_{\textrm{e}}^{\textrm{nrcpeakeven}(\sigma )} v_{\textrm{e}}^{\textrm{nrcvaleven}(\sigma )} \, \nonumber \\ & \qquad \times \;\, x_{\textrm{o}}^{\textrm{eareccpeakodd}(\sigma )} y_{\textrm{o}}^{\textrm{ereccvalodd}(\sigma )} u_{\textrm{o}}^{\textrm{nrcpeakodd}(\sigma )} v_{\textrm{o}}^{\textrm{nrcvalodd}(\sigma )} \end{aligned}$$
(5.12)
$$\begin{aligned} & Q_n^{{\mathcal {A}}\mathfrak {C}}(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},v_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},v_{\textrm{o}},p_{-1},p_{-2},p_{+1},p_{+2},q_{-1},q_{-2},q_{+1},q_{+2}) \nonumber \\ & \quad = \sum _{\sigma \in {{\mathcal {A}}\mathfrak {C}}_{2n}} x_{\textrm{e}}^{\textrm{eareccpeakeven}(\sigma )} y_{\textrm{e}}^{\textrm{ereccvaleven}(\sigma )} u_{\textrm{e}}^{\textrm{nrcpeakeven}(\sigma )} v_{\textrm{e}}^{\textrm{nrcvaleven}(\sigma )} \, \nonumber \\ & \qquad \times \;\, x_{\textrm{o}}^{\textrm{eareccpeakodd}(\sigma )} y_{\textrm{o}}^{\textrm{ereccvalodd}(\sigma )} u_{\textrm{o}}^{\textrm{nrcpeakodd}(\sigma )} v_{\textrm{o}}^{\textrm{nrcvalodd}(\sigma )} \, \nonumber \\ & \qquad \times \;\, p_{-1}^{\textrm{lcrosscpeakeven}(\sigma )} p_{-2}^{\textrm{lcrosscpeakodd}(\sigma )} p_{+1}^{\textrm{ucrosscvalodd}(\sigma )} p_{+2}^{\textrm{ucrosscvaleven}(\sigma )} \, \nonumber \\ & \qquad \times \;\, q_{-1}^{\textrm{lnestcpeakeven}(\sigma )} q_{-2}^{\textrm{lnestcpeakodd}(\sigma )} q_{+1}^{\textrm{unestcvalodd}(\sigma )} q_{+2}^{\textrm{unestcvaleven}(\sigma )}, \end{aligned}$$
(5.13)
$$\begin{aligned} & Q^{{\mathcal {A}}\mathfrak {C}}_n({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}}) \;=\; \sum _{\sigma \in {{\mathcal {A}}\mathfrak {C}}_{2n}} \;\, \prod \limits _{i \in \textrm{Cval}} \! {\textsf{a}}_{\textrm{ucross}(i,\sigma )\,+\,\textrm{unest}(i,\sigma )} \prod \limits _{i \in \textrm{Cpeak}} \!\! {\textsf{b}}_{\textrm{lcross}(i,\sigma ),\,\textrm{lnest}(i,\sigma )}.\nonumber \\ \end{aligned}$$
(5.14)

Since the results for alternating cycles will arise by specialization of the results that include counting of cycles, the same specializations are needed to obtain nice continued fractions. Extracting the coefficient of \(\lambda ^1\) in Theorem 5.1, we deduce the following:

Corollary 5.3

(S-fraction for alternating cycles) The ordinary generating function of the polynomials (5.12) with the specializations \(y_{\textrm{e}}=v_{\textrm{e}}\) and \(y_{\textrm{o}}=v_{\textrm{o}}\) has the S-type continued fraction

$$\begin{aligned} \sum _{n=0}^\infty Q^{{\mathcal {A}}\mathfrak {C}}_{n+1}(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},y_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},y_{\textrm{o}}) \, t^n \;=\; \frac{x_{\textrm{e}}y_{\textrm{o}}}{1 - \frac{(x_{\textrm{o}}\!+\!u_{\textrm{o}})y_{\textrm{e}}t}{1 - \frac{ 2(x_{\textrm{e}}\!+\!2u_{\textrm{e}})y_{\textrm{o}}t}{1 - \cdots }}}, \end{aligned}$$
(5.15)

with coefficients

$$\begin{aligned} \alpha _{2k-1}= & (2k-1) \, [x_{\textrm{o}}+ (2k-1) u_{\textrm{o}}] \, y_{\textrm{e}}, \end{aligned}$$
(5.16a)
$$\begin{aligned} \alpha _{2k}= & 2k \,[x_{\textrm{e}}+ 2k u_{\textrm{e}}] \, y_{\textrm{o}}. \end{aligned}$$
(5.16b)

Specializing to \(x_{\textrm{e}}=y_{\textrm{e}}=u_{\textrm{e}}=x_{\textrm{o}}=y_{\textrm{o}}=u_{\textrm{o}}=1\), we see that \(|{{\mathcal {A}}\mathfrak {C}}_{2n+2}|\) has an S-fraction with coefficients \(\alpha _n = n(n+1)\), which is well known to be the S-fraction for the tangent numbers \(E_{2n+1}\) [23, A000182]. In other words, \(|{{\mathcal {A}}\mathfrak {C}}_{2n}| = E_{2n-1}\).

Similarly, extracting the coefficient of \(\lambda ^1\) in Theorem 5.2, we deduce:

Corollary 5.4

(S-fraction for alternating cycles, pq-generalization) The ordinary generating function of the polynomials (5.13) with the specializations \(y_{\textrm{e}}=v_{\textrm{e}}\), \(y_{\textrm{o}}=v_{\textrm{o}}\), \(p_{+1} = q_{+1}\) and \(p_{+2}=q_{+2}\) has the S-type continued fraction

$$\begin{aligned} & \sum _{n=0}^\infty Q^{{\mathcal {A}}\mathfrak {C}}_{n+1}(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},y_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},y_{\textrm{o}},p_{-1},p_{-2},p_{+1},p_{+2},q_{-1},q_{-2},p_{+1},p_{+2}) \, t^n \qquad \nonumber \\ & \hspace{1cm} =\; \frac{x_{\textrm{e}}y_{\textrm{o}}}{1 - \frac{(p_{-2}x_{\textrm{o}}\!+\!q_{-2}u_{\textrm{o}})p_{+2}y_{\textrm{e}}t}{1 - \frac{2(p_{-1}^2x_{\textrm{e}}\!+\!q_{-1}[2]_{p_{-1},q_{-1}}u_{\textrm{e}})p_{+1}^2y_{\textrm{o}}t}{1 - \cdots }}}, \end{aligned}$$
(5.17)

with coefficients

$$\begin{aligned} \alpha _{2k-1}= & (2k-1)\,(p_{-2}^{2k-1}x_{\textrm{o}}+ q_{-2}[2k-1]_{p_{-2},q_{-2}} u_{\textrm{o}}) \, p_{+2}^{2k-1}y_{\textrm{e}}, \end{aligned}$$
(5.18a)
$$\begin{aligned} \alpha _{2k}= & 2k \,(p_{-1}^{2k}x_{\textrm{e}}+ q_{-1}[2k]_{p_{-1},q_{-1}} u_{\textrm{e}}) \, p_{+1}^{2k}y_{\textrm{o}}. \end{aligned}$$
(5.18b)

Finally, extracting the coefficient of \(\lambda ^1\) in (5.9)/ (5.10), we obtain:

Corollary 5.5

(Master S-fraction for alternating cycles) The ordinary generating function of the polynomials (5.14) has the S-type continued fraction

$$\begin{aligned} \sum _{n=0}^\infty Q_{n+1}^{{\mathcal {A}}\mathfrak {C}}( {{{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}}}) \, t^n \;=\; \frac{{\textsf{a}}_{0} {\textsf{b}}_{00}}{1 - \frac{{\textsf{a}}_{1} ({\textsf{b}}_{01} + {\textsf{b}}_{10}) t}{1 - \frac{2{\textsf{a}}_{2}({\textsf{b}}_{02} + {\textsf{b}}_{11} + {\textsf{b}}_{20}) t}{1 - \cdots }}}, \end{aligned}$$
(5.19)

with coefficients

$$\begin{aligned} \alpha _n \;=\; n \, {\textsf{a}}_{n} \biggl ( \sum _{\ell =0}^{n} {\textsf{b}}_{\ell ,n-\ell } \biggr ) . \end{aligned}$$
(5.20)

5.4 Open problem: combinatorial model for the tangent numbers

Let us start by noting the inequalities

$$\begin{aligned} E_{2n-1} \;\le \; E_{2n} \;\le \; E_{2n+1} \;\le \; (2n)!. \end{aligned}$$
(5.21)

We have just seen that the down-shifted tangent numbers \(E_{2n-1}\) enumerate the set \({{\mathcal {A}}\mathfrak {C}}_{2n}\) of alternating cycles on [2n], while the secant numbers \(E_{2n}\) enumerate the set \({\mathfrak {S}}_{2n}^{\textrm{ca}}\) of cycle-alternating permutations of [2n]. The inequality \(E_{2n} \le E_{2n+1} \le (2n)!\) suggests that also the tangent numbers \(E_{2n+1}\) should enumerate some class of permutations of [2n] that contains \({\mathfrak {S}}_{2n}^{\textrm{ca}}\). What class? We pose this as an open problem:

Open Problem 5.6

  1. (a)

    Find a natural class \({\mathcal {C}}\) satisfying \({\mathfrak {S}}_{2n}^{\textrm{ca}} \subseteq {\mathcal {C}}\subseteq {\mathfrak {S}}_{2n}\) and \(|{\mathcal {C}}| = E_{2n+1}\).

  2. (b)

    Find statistics on \({\mathcal {C}}\) whose generating polynomials have a nice S-fraction that generalizes the coefficients \(\alpha _n = n(n+1)\) for the tangent numbers. Ideally these statistics would also be such that, by specializing some variables to zero, we reobtain some or all of the continued fractions of the present paper for cycle-alternating permutations.

We remark that an analogous situation occurs for the Genocchi numbers \(g_n\) and the median Genocchi numbers \(h_n\) (in the notation of [2]), which satisfy

$$\begin{aligned} g_{n-1} \;\le \; h_n \;\le \; g_n \;\le \; h_{n+1} \;\le \; (2n)!. \end{aligned}$$
(5.22)

In this case the relevant objects are a class of permutations of [2n] called D-permutations [20, 21] and their subsets

$$\begin{aligned} \hbox {D-cycles} \;\subseteq \; \hbox {D-derangements} \;\subseteq \; \hbox {D-semiderangements} \;\subseteq \; \hbox {D-permutations},\nonumber \\ \end{aligned}$$
(5.23)

and we have [2, 8, 12, 20, 21]

$$\begin{aligned} |\hbox {D-cycles}|= & g_{n-1}, \end{aligned}$$
(5.24a)
$$\begin{aligned} |\hbox {D-derangements}|= & h_n, \end{aligned}$$
(5.24b)
$$\begin{aligned} |\hbox {D-semiderangements}|= & g_n, \end{aligned}$$
(5.24c)
$$\begin{aligned} |\hbox {D-permutations}|= & h_{n+1}. \end{aligned}$$
(5.24d)

Furthermore, in [2] we obtained continued fractions for multivariate polynomials enumerating D-permutations, which by specializing some variables to zero gave continued fractions enumerating D-semiderangements and D-derangements; furthermore, by extracting the coefficient of \(\lambda ^1\) in a cycle-counting result, we obtained continued fractions enumerating D-cycles. It would be nice to have analogous results in the present context.

6 Alternating Laguerre digraphs

We now place permutations in a more general context: that of Laguerre digraphs. Recall from the Introduction that a Laguerre digraph [4, 17, 29] is a digraph in which each vertex has out-degree 0 or 1 and in-degree 0 or 1. For each integer \(n \ge 0\), let us write \({{\textbf {LD}}}_n\) for the set of Laguerre digraphs on the vertex set \([n] {\mathop {=}\limits ^\textrm{def}}\{1,\ldots ,n\}\); and for \(n \ge k \ge 0\), let us write \({{\textbf {LD}}}_{n,k}\) for the set of Laguerre digraphs on the vertex set [n] with k paths. A Laguerre digraph with no paths is simply a collection of directed cycles, i.e. the digraph associated to a permutation \(\sigma \in {\mathfrak {S}}_n\) [33, pp. 22–23]. There is thus a natural bijection \({{\textbf {LD}}}_{n,0} \simeq {\mathfrak {S}}_n\).

The study of Laguerre digraphs \({{\textbf {LD}}}_{n,k}\) thus generalizes the study of permutations \({{\textbf {LD}}}_{n,0} \simeq {\mathfrak {S}}_n\). In a similar way, we will define a class of alternating Laguerre digraphs \({{\textbf {LD}}}^{\textrm{alt}}_{n,k}\) so as to generalize the study of cycle-alternating permutations \({{\textbf {LD}}}^{\textrm{alt}}_{n,0} \simeq {\mathfrak {S}}^{\textrm{ca}}_n\). Just as \({\mathfrak {S}}^{\textrm{ca}}_n \ne \emptyset \) only for n even, we will see that \({{\textbf {LD}}}^{\textrm{alt}}_{n,k} \ne \emptyset \) only for \(n+k\) even.

We begin (Sect. 6.1) by deriving an exponential generating function for Laguerre digraphs with a very general set of weights [4]. Then (Sect. 6.2) we define alternating Laguerre digraphs and specialize to obtain their exponential generating function. Next (Sect. 6.3) we obtain the generalized Jacobi–Rogers and Stieltjes–Rogers polynomials associated to the secant power polynomials, using exponential generating functions. Then (Sect. 6.4) we obtain the generalized Stieltjes–Rogers polynomials associated to the second master S-fraction for cycle-alternating permutations (Eqs. (5.9)/(5.10)), using combinatorial methods. Finally (Sect. 6.5) we specialize this latter result to obtain the generalized Stieltjes-Rogers polynomials corresponding to the S-fractions of Theorems 5.1 and 5.2.

6.1 Exponential generating function for Laguerre digraphs

Before defining our statistics on Laguerre digraphs, we first need to make a convention about boundary conditions at the two ends of a path. We will here use 0–0 boundary conditions: that is, we extend the Laguerre digraph G on the vertex set [n] to a digraph \(\widehat{G}\) on the vertex set \([n] \cup \{0\}\) by decreeing that any vertex \(i \in [n]\) that has in-degree (resp. out-degree) 0 in G will receive an incoming (resp. outgoing) edge from (resp. to) the vertex 0. In this way each vertex \(i \in [n]\) will have a unique predecessor \(p(i) \in [n] \cup \{0\}\) and a unique successor \(s(i) \in [n] \cup \{0\}\). We then say that a vertex \(i \in [n]\) is a

  • peak (p) if \(p(i) < i > s(i)\);

  • valley (v) if \(p(i) > i < s(i)\);

  • double ascent (da) if \(p(i)< i < s(i)\);

  • double descent (dd) if \(p(i)> i > s(i)\);

  • fixed point (fp) if \(p(i) = i = s(i)\).

(Note that “fixed point” is a synonym of “loop”.) When these concepts are applied to the cycles of a Laguerre digraph, we obtain the usual cycle classification of indices in a permutation as cycle peaks, cycle valleys, cycle double rises, cycle double falls and fixed points [31, 38]. When applied to the paths of a Laguerre digraph, we obtain the usual linear classification of indices in a permutation (written in word form) as peaks, valleys, double ascents or double descents [33, p. 45]. Note that, because of the 0–0 boundary conditions, an isolated vertex is always a peak, the initial vertex of a path is always a peak or double ascent, and the final vertex of a path is always a peak or double descent; moreover, each path contains at least one peak.

We write \(\textrm{p}(G), \textrm{v}(G), \textrm{da}(G), \textrm{dd}(G), \textrm{fp}(G)\) for the number of vertices \(i \in [n]\) that are, respectively, peaks, valleys, double ascents, double descents or fixed points. We then introduce the multivariate Laguerre coefficient matrix

$$\begin{aligned} {\widehat{\textsf{L}}}^{(\alpha )}({y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}})_{n,k} \;{\mathop {=}\limits ^\textrm{def}}\; \sum _{G \in {{\textbf {LD}}}_{n,k}} y_{\textrm{p}}^{\textrm{p}(G)} y_{\textrm{v}}^{\textrm{v}(G)} y_{\textrm{da}}^{\textrm{da}(G)} y_{\textrm{dd}}^{\textrm{dd}(G)} y_{\textrm{fp}}^{\textrm{fp}(G)} \, (1+\alpha )^{\textrm{cyc}(G)}.\nonumber \\ \end{aligned}$$
(6.1)

This polynomial is homogeneous of degree n in \({y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}}\). (The weight per cycle is here written as \(1+\alpha \) instead of \(\lambda \) because these polynomials generalize the Laguerre polynomials with parameter \(\alpha \).)

Indeed, we can go farther, by assigning different weights for the vertices belonging to a cycle or to a path. For a Laguerre digraph G, let us write \(\textrm{pcyc}(G)\), \(\textrm{vcyc}(G)\), \(\textrm{dacyc}(G)\), \(\textrm{ddcyc}(G)\), \(\textrm{fp}(G)\) for the number of peaks, valleys, double ascents, double descents and fixed points that belong to a cycle of G, and \(\textrm{ppa}(G)\), \(\textrm{vpa}(G)\), \(\textrm{dapa}(G)\), \(\textrm{ddpa}(G)\) for the number of peaks, valleys, double ascents and double descents that belong to a path of G (of course fixed points can only belong to a cycle). We then assign weights \({y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}}\) to the vertices belonging to a cycle, and weights \({z_\textrm{p}},{z_\textrm{v}},{z_\textrm{da}},{z_\textrm{dd}}\) to the vertices belonging to a path. We therefore define the generalized multivariate Laguerre coefficient matrix

$$\begin{aligned} & \!\!\!\! {\widetilde{\textsf{L}}}^{(\alpha )}({y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}}, {z_\textrm{p}},{z_\textrm{v}},{z_\textrm{da}},{z_\textrm{dd}})_{n,k} \nonumber \\ & \quad {\mathop {=}\limits ^\textrm{def}}\sum _{G \in {{\textbf {LD}}}_{n,k}} y_{\textrm{p}}^{\textrm{pcyc}(G)} y_{\textrm{v}}^{\textrm{vcyc}(G)} y_{\textrm{da}}^{\textrm{dacyc}(G)} y_{\textrm{dd}}^{\textrm{ddcyc}(G)} y_{\textrm{fp}}^{\textrm{fp}(G)} \, z_{\textrm{p}}^{\textrm{ppa}(G)} z_{\textrm{v}}^{\textrm{vpa}(G)} z_{\textrm{da}}^{\textrm{dapa}(G)} z_{\textrm{dd}}^{\textrm{ddpa}(G)} \, \nonumber \\ & \qquad \times \;\, \, (1+\alpha )^{\textrm{cyc}(G)} \,. \qquad \end{aligned}$$
(6.2)

This polynomial is homogeneous of degree n in \({y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}},{z_\textrm{p}},{z_\textrm{v}},{z_\textrm{da}},{z_\textrm{dd}}\).

We now proceed to compute the exponential generating functions for the matrices (6.2). We do this by combining the known exponential generating functions for permutations with cyclic statistics [38, Théorème 1] and permutations with linear statistics [38, Proposition 4]. These formulae are as follows:

  1. (1)

    Permutations with cyclic statistics are enumerated by the polynomials

    $$\begin{aligned} P_n^{\textrm{cyc}}({y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}},\lambda ) {\mathop {=}\limits ^\textrm{def}} \sum _{\sigma \in {\mathfrak {S}}_n} y_{\textrm{p}}^{\textrm{pcyc}(\sigma )} y_{\textrm{v}}^{\textrm{vcyc}(\sigma )} y_{\textrm{da}}^{\textrm{dacyc}(\sigma )} y_{\textrm{dd}}^{\textrm{ddcyc}(\sigma )} y_{\textrm{fp}}^{\textrm{fp}(\sigma )} \, \lambda ^{\textrm{cyc}(\sigma )},\nonumber \\ \end{aligned}$$
    (6.3)

    where \(\textrm{pcyc}(\sigma )\), \(\textrm{vcyc}(\sigma )\), \(\textrm{dacyc}(\sigma )\), \(\textrm{ddcyc}(\sigma )\), \(\textrm{fp}(\sigma )\) denote the number of cycle peaks, cycle valleys, cycle double rises, cycle double falls and fixed points in \(\sigma \), and \(\textrm{cyc}(\sigma )\) denotes the number of cycles in \(\sigma \). By convention we set \(P_0^{\textrm{cyc}} = 1\). The polynomial \(P_n^{\textrm{cyc}}\) is homogeneous of degree n in \({y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}}\). We write

    $$\begin{aligned} F(t;{y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}},\lambda ) \;{\mathop {=}\limits ^\textrm{def}}\; \sum _{n=0}^\infty P_n^{\textrm{cyc}}({y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}},\lambda ) \, {t^n \over n!}, \end{aligned}$$
    (6.4)

    for the corresponding exponential generating function.

Lemma 6.1

([38, Théorème 1]) We have

$$\begin{aligned} F(t;{y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}},\lambda )= & e^{\lambda {y_\textrm{fp}}t} \, \biggl ( {r_1 \,-\, r_2 \over r_1 e^{r_2 t} \,-\, r_2 e^{r_1 t} } \biggr )^{\! \lambda }, \end{aligned}$$
(6.5a)
$$\begin{aligned}= & F(t;{y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}},1)^\lambda , \end{aligned}$$
(6.5b)

where \(r_1 r_2 = {y_\textrm{p}}{y_\textrm{v}}\) and \(r_1 + r_2 = {y_\textrm{da}}+ {y_\textrm{dd}}\). Otherwise put, \(r_1\) and \(r_2\) are the roots (in either order) of the quadratic equation \(\rho ^2 - ({y_\textrm{da}}+ {y_\textrm{dd}}) \rho + {y_\textrm{p}}{y_\textrm{v}}= 0\). Concretely,

$$\begin{aligned} r_{1,2} \;=\; {{y_\textrm{da}}+ {y_\textrm{dd}}\pm \sqrt{({y_\textrm{da}}+ {y_\textrm{dd}})^2 - 4{y_\textrm{p}}{y_\textrm{v}}} \over 2 } . \end{aligned}$$
(6.6)
  1. (2)

    Permutations with linear statistics and 0–0 boundary conditions are enumerated by the polynomials

    $$\begin{aligned} P_n^{\mathrm{lin(00)}}({z_\textrm{p}},{z_\textrm{v}},{z_\textrm{da}},{z_\textrm{dd}}) \;{\mathop {=}\limits ^\textrm{def}}\; \sum _{\sigma \in {\mathfrak {S}}_n} z_{\textrm{p}}^{\textrm{ppa}(\sigma )} z_{\textrm{v}}^{\textrm{vpa}(\sigma )} z_{\textrm{da}}^{\textrm{dapa}(\sigma )} z_{\textrm{dd}}^{\textrm{ddpa}(\sigma )}, \end{aligned}$$
    (6.7)

    where \(\textrm{ppa}(\sigma )\), \(\textrm{vpa}(\sigma )\), \(\textrm{dapa}(\sigma )\), \(\textrm{ddpa}(\sigma )\) denote the number of peaks, valleys, double ascents and double descents in the permutation \(\sigma \) written as a word \(\sigma _1 \cdots \sigma _n\), where we impose the boundary conditions \(\sigma _0 = \sigma _{n+1} = 0\). By convention we restrict attention to \(n \ge 1\). The polynomial \(P_n^{\mathrm{lin(00)}}\) is homogeneous of degree n in \({z_\textrm{p}},{z_\textrm{v}},{z_\textrm{da}},{z_\textrm{dd}}\). We write

    $$\begin{aligned} G(t;{z_\textrm{p}},{z_\textrm{v}},{z_\textrm{da}},{z_\textrm{dd}}) \;{\mathop {=}\limits ^\textrm{def}}\; \sum _{n=1}^\infty P_n^{\mathrm{lin(00)}}({z_\textrm{p}},{z_\textrm{v}},{z_\textrm{da}},{z_\textrm{dd}}) \, {t^n \over n!}, \end{aligned}$$
    (6.8)

    for the corresponding exponential generating function (note that the sum starts at \(n=1\)).

Lemma 6.2

([38, Proposition 4]) We have

$$\begin{aligned} G(t;{z_\textrm{p}},{z_\textrm{v}},{z_\textrm{da}},{z_\textrm{dd}}) \;=\; {z_\textrm{p}}\, \biggl ( {e^{r_1 t} \,-\, e^{r_2 t} \over r_1 e^{r_2 t} \,-\, r_2 e^{r_1 t}} \biggr ), \end{aligned}$$
(6.9)

where \(r_1 r_2 = {z_\textrm{p}}{z_\textrm{v}}\) and \(r_1 + r_2 = {z_\textrm{da}}+ {z_\textrm{dd}}\) analogously to Lemma 6.1. This function satisfies the differential equation

$$\begin{aligned} G'(t) \;=\; {z_\textrm{p}}\,+\, ({z_\textrm{da}}+{z_\textrm{dd}}) G(t) \,+\, {z_\textrm{v}}G(t)^2. \end{aligned}$$
(6.10)

We can now put these ingredients together to determine the exponential generating functions for the matrix (6.2). A Laguerre digraph \(G \in {{\textbf {LD}}}_{n,k}\) consists of a permutation (that is, a collection of disjoint cycles) on some subset \(S \subseteq [n]\) together with k disjoint paths on \([n] \setminus S\). Each of these paths can be considered as a permutation written in word form. By the exponential formula, the exponential generating function for the kth column of the matrix (6.2) is then

$$\begin{aligned} & \sum _{n=0}^\infty {\widetilde{\textsf{L}}}^{(\alpha )}({y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}}, {z_\textrm{p}},{z_\textrm{v}},{z_\textrm{da}},{z_\textrm{dd}})_{n,k} \, {t^n \over n!} \nonumber \\ & \qquad =\; F(t;{y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}},1)^{1+\alpha } \; {G(t;{z_\textrm{p}},{z_\textrm{v}},{z_\textrm{da}},{z_\textrm{dd}})^k \over k!} , \qquad \qquad \end{aligned}$$
(6.11)

where the 1/k! comes because the paths are indistinguishable. The bivariate exponential generating function is therefore

$$\begin{aligned} & \sum _{n=0}^\infty \sum _{k=0}^n {\widetilde{\textsf{L}}}^{(\alpha )}({y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}}, {z_\textrm{p}},{z_\textrm{v}},{z_\textrm{da}},{z_\textrm{dd}})_{n,k} \, {t^n \over n!} \, u^k \nonumber \\ & \qquad =\; F(t;{y_\textrm{p}},{y_\textrm{v}},{y_\textrm{da}},{y_\textrm{dd}},{y_\textrm{fp}},1)^{1+\alpha } \; \exp \bigl [ u \, G(t;{z_\textrm{p}},{z_\textrm{v}},{z_\textrm{da}},{z_\textrm{dd}}) \bigr ] . \qquad \qquad \end{aligned}$$
(6.12)

6.2 Alternating Laguerre digraphs

We define an alternating Laguerre digraph to be a Laguerre digraph in which there are no double ascents, double descents or fixed points. It follows that all the cycles are of even length and consist of cycle peaks and cycle valleys in alternation. Furthermore, since we are using 0–0 boundary conditions, all the paths are of odd length and consist of peaks and valleys in alternation, starting and ending with a peak: \(0< x_1> x_2< x_3> \cdots < x_{2m+1} > 0\). That is, the paths are simply alternating (down-up) permutations [32] of odd length written in word form: \(x_1> x_2< x_3 > \ldots < x_{2m+1}\). We write \({{\textbf {LD}}}^{\textrm{alt}}_{n,k}\) for the set of alternating Laguerre digraphs on the vertex set [n] with k paths. Since each path has odd length and each cycle has even length, it follows that \({{\textbf {LD}}}^{\textrm{alt}}_{n,k} \ne \emptyset \) only if \(n+k\) is even. We have the obvious bijection \({{\textbf {LD}}}^{\textrm{alt}}_{n,0} \simeq {\mathfrak {S}}^{\textrm{ca}}_n\). In this way, alternating Laguerre digraphs generalize cycle-alternating permutations, to which they reduce when \(k=0\).

We define a generating polynomial for alternating Laguerre digraphs by specializing the one for Laguerre digraphs to forbid double ascents, double descents and fixed points:

$$\begin{aligned} {\widetilde{\textsf{L}}}^{(\alpha )\mathrm alt}({y_\textrm{p}},{y_\textrm{v}}, {z_\textrm{p}},{z_\textrm{v}})_{n,k}&{\mathop {=}\limits ^\textrm{def}}&{\widetilde{\textsf{L}}}^{(\alpha )}({y_\textrm{p}},{y_\textrm{v}},0,0,0, {z_\textrm{p}},{z_\textrm{v}},0,0)_{n,k} \end{aligned}$$
(6.13a)
$$\begin{aligned}= & \sum _{G \in {{\textbf {LD}}}^{\textrm{alt}}_{n,k}} y_{\textrm{p}}^{\textrm{pcyc}(G)} y_{\textrm{v}}^{\textrm{vcyc}(G)} \, z_{\textrm{p}}^{\textrm{ppa}(G)} z_{\textrm{v}}^{\textrm{vpa}(G)} \,\times \, (1+\alpha )^{\textrm{cyc}(G)} \,. \nonumber \\ \end{aligned}$$
(6.13b)

This polynomial is homogeneous of degree n in \({y_\textrm{p}},{y_\textrm{v}},{z_\textrm{p}},{z_\textrm{v}}\).

Specializing Lemma 6.1 to \({y_\textrm{da}}= {y_\textrm{dd}}= {y_\textrm{fp}}= 0\), we have \(r_1 = +i \sqrt{{y_\textrm{p}}{y_\textrm{v}}}\) and \(r_2 = -i \sqrt{{y_\textrm{p}}{y_\textrm{v}}}\), hence

$$\begin{aligned} F(t;{y_\textrm{p}},{y_\textrm{v}},0,0,0,\lambda ) \;=\; \bigl [ \sec \big (\sqrt{{y_\textrm{p}}{y_\textrm{v}}} \, t\big ) \bigr ]^{\!\lambda } . \end{aligned}$$
(6.14)

Similarly, specializing Lemma 6.2 to \({z_\textrm{da}}= {z_\textrm{dd}}= 0\), we have

$$\begin{aligned} G(t;{z_\textrm{p}},{z_\textrm{v}},0,0) \;=\; \sqrt{{z_\textrm{p}}/{z_\textrm{v}}} \, \tan \big (\sqrt{{z_\textrm{p}}{z_\textrm{v}}} \, t\big ). \end{aligned}$$
(6.15)

Therefore, the exponential generating function for the kth column of the matrix (6.13) is

$$\begin{aligned} & \sum _{n=0}^\infty {\widetilde{\textsf{L}}}^{(\alpha )\mathrm alt}({y_\textrm{p}},{y_\textrm{v}}, {z_\textrm{p}},{z_\textrm{v}})_{n,k} \, {t^n \over n!} \nonumber \\ & \quad \;=\; \bigl [\sec \big (\sqrt{{y_\textrm{p}}{y_\textrm{v}}} \, t\big )\bigr ]^{\! 1+\alpha } \; {\bigl [ \sqrt{{z_\textrm{p}}/{z_\textrm{v}}} \, \tan \big (\sqrt{{z_\textrm{p}}{z_\textrm{v}}} \, t\big )\bigr ]^k \over k!} . \end{aligned}$$

In order to make the connection with continued fractions, we will want to give path vertices and cycle vertices the same weights, i.e. \({z_\textrm{p}}= {y_\textrm{p}}\) and \({z_\textrm{v}}= {y_\textrm{v}}\). Once we have made this specialization, there is no loss of generality in taking \({y_\textrm{p}}= {y_\textrm{v}}= 1\), since those variables would simply make a trivial rescaling. We therefore have

$$\begin{aligned} \sum _{n=0}^\infty {\widetilde{\textsf{L}}}^{(\alpha )\mathrm alt}(1,1,1,1)_{n,k} \, {t^n \over n!} \;=\; (\sec t)^{1+\alpha } \; {(\tan t)^k \over k!} . \end{aligned}$$
(6.16)

In particular, the zeroth column \({\widetilde{\textsf{L}}}^{(\alpha )\mathrm alt}(1,1,1,1)_{n,0}\) has the secant power polynomials at even n and zero entries at odd n, where the secant power polynomials are defined by

$$\begin{aligned} (\sec t )^\lambda \;=\; \sum _{n=0}^\infty E_{2n}(\lambda ) \, {t^{2n} \over (2n)!} . \end{aligned}$$
(6.17)

The first 8 rows and columns of the matrix \({\widetilde{\textsf{L}}}^{(\alpha )\mathrm alt}(1,1,1,1)\) (written for simplicity in terms of \(\lambda = 1+\alpha \)) are

(6.18)

6.3 Continued fraction for secant power polynomials

Following Stieltjes [34] and Rogers [26], we can use Rogers’ addition formula (Theorem 2.2 above) to obtain the continued fraction for the secant power polynomials. From the high-school angle-addition formula

$$\begin{aligned} \cos (t+u)= & (\cos t)(\cos u) \,-\, (\sin t)(\sin u), \end{aligned}$$
(6.19a)
$$\begin{aligned}= & (\cos t)(\cos u) \, [ 1 \,-\, (\tan t)(\tan u) ], \end{aligned}$$
(6.19b)

we obtain

$$\begin{aligned} [\sec (t+u)]^\lambda \;=\; (\sec t)^\lambda (\sec u)^\lambda \, \sum _{k=0}^\infty \left( {\begin{array}{c}\lambda +k-1\\ k\end{array}}\right) \, (\tan t)^k \, (\tan u)^k , \end{aligned}$$
(6.20)

which is of the form (2.10)/(2.11) with

$$\begin{aligned} \beta _k \ = \ k(\lambda +k-1) ,\qquad F_k(t) \ = \ {(\sec t)^\lambda \, (\tan t)^k \over k!} \ = \ {t^k \over k!} \,+\, O(t^{k+2}), \end{aligned}$$
(6.21)

so that \(\mu _k = 0\) and hence \(\gamma _k = 0\). Theorem 2.2 then implies that the ordinary generating function of the secant power polynomials is given by the J-fraction

$$\begin{aligned} \sum _{n=0}^\infty E_{2n}(\lambda ) \, t^{2n} \;=\; \frac{1}{1 - \frac{1 \cdot \lambda t^2}{1 - \frac{2(\lambda +1) t^2}{1 - \frac{3(\lambda +2) t^2}{1 - \cdots }}}} . \end{aligned}$$
(6.22)

After renaming \(t^2 \rightarrow t\), this is actually an S-fraction with coefficients \(\alpha _n = n(\lambda +n-1)\). So far, this is all well known. And comparing (6.22) with Theorem 5.1, we see that \(E_{2n}(\lambda )\) enumerates cycle-alternating permutations of [2n] with a weight \(\lambda \) for each cycle.

But Theorem 2.2 gives more: it tells us that \(F_k(t) = (\sec t)^\lambda \, (\tan t)^k / k!\) is the exponential generating function for the kth column of the generalized Jacobi–Rogers matrix \(\textsf{J}= \big ( J_{n,k}({{\varvec{\beta }}},{{\varvec{\gamma }}}) \big )_{\! n,k \ge 0}\) with \(\beta _n = n(\lambda +n-1)\) and \({{\varvec{\gamma }}}= {{\varvec{0}}}\). On the other hand, we know from (6.16) that this \(F_k(t)\) is precisely the exponential generating function for alternating Laguerre digraphs with k paths, \({\widetilde{\textsf{L}}}^{(\alpha )\mathrm alt}(1,1,1,1)_{n,k}\), with \(\lambda = 1+\alpha \):

$$\begin{aligned} {\widetilde{\textsf{L}}}^{(\alpha )\mathrm alt}(1,1,1,1)_{n,k} \;=\; \Bigl [ {t^n \over n!} \Bigr ] \, {(\sec t)^{1+\alpha } \, (\tan t)^k \over k!} . \end{aligned}$$
(6.23)

We have therefore shown:

Proposition 6.3

The generalized Jacobi–Rogers polynomial \(J_{n,k}({{\varvec{\beta }}},{{\varvec{\gamma }}})\) with \(\beta _n = n(n+\alpha )\) and \({{\varvec{\gamma }}}= {{\varvec{0}}}\) enumerates alternating Laguerre digraphs on [n] with k paths with a weight \(1+\alpha \) for each cycle.

By extracting the submatrices (2n, 2k) and \((2n+1,2k+1)\) using (2.18), we can equivalently obtain the generalized Stieltjes–Rogers polynomials \(S_{n,k}({{\varvec{\alpha }}})\) and \(S'_{n,k}({{\varvec{\alpha }}})\) with \(\alpha _n = n(n+\alpha )\):

$$\begin{aligned} S_{n,k}({{\varvec{\alpha }}})= & \Bigl [ {t^{2n} \over (2n)!} \Bigr ] \, {(\sec t)^{1+\alpha } \, (\tan t)^{2k} \over (2k)!}, \end{aligned}$$
(6.24a)
$$\begin{aligned} S'_{n,k}({{\varvec{\alpha }}})= & \Bigl [ {t^{2n+1} \over (2n+1)!} \Bigr ] \, {(\sec t)^{1+\alpha } \, (\tan t)^{2k+1} \over (2k+1)!}. \end{aligned}$$
(6.24b)

Corollary 6.4

The generalized Stieltjes–Rogers polynomial \(S_{n,k}({{\varvec{\alpha }}})\) [resp. \(S'_{n,k}({{\varvec{\alpha }}})\)] with \(\alpha _n = n(n+\alpha )\) enumerates alternating Laguerre digraphs on [2n] with 2k paths [resp. on \([2n+1]\) with \(2k+1\) paths] with a weight \(1+\alpha \) for each cycle.

6.4 Generalized Stieltjes–Rogers polynomials for the second master S-fraction

We now propose to show how the generalized Stieltjes–Rogers polynomials of the first and second kinds for the second master S-fraction for cycle-alternating permutations, (5.9)/(5.10), can be understood as generating polynomials for alternating Laguerre digraphs. This will lead to a far-reaching generalization of Proposition 6.3 and Corollary 6.4, and at the same time of [31, Theorem 2.23].

To do this, it is convenient to use a different convention about the boundary conditions at the two ends of a path of a Laguerre digraph. Namely, we will here use \(\infty \)\(\infty \) (rather than 0–0) boundary conditions: that is, we extend the Laguerre digraph G on the vertex set [n] to a digraph \(\widehat{G}\) on the vertex set \([n] \cup \{\infty \}\) by decreeing that any vertex \(i \in [n]\) that has in-degree (resp. out-degree) 0 in G will receive an incoming (resp. outgoing) edge from (resp. to) the vertex \(\infty \). However, our definitions of peak, valley, double ascent, double descent and fixed point will be the same as before. Note that, because of the \(\infty \)\(\infty \) boundary conditions, an isolated vertex is always a valley, the initial vertex of a path is always a valley or double descent, and the final vertex of a path is always a valley or double ascent; moreover, each path contains at least one valley. We also recall that, for a given vertex \(i\in [n]\), we use p(i) to denote its predecessor in \(\widehat{G}\), and s(i) to denote its successor. Later we will explain why we have found it convenient to use \(\infty \)\(\infty \) boundary conditions.

With these boundary conditions, an alternating Laguerre digraph will still have cycles of even length with cycle peaks and cycle valleys in alternation, and paths of odd length consisting of peaks and valleys in alternation. However, the paths will start and end with a valley: \(\infty> x_1< x_2> x_3< \cdots > x_{2m+1} < \infty \). The paths are now alternating (up-down) permutations of odd length written in word form: \(x_1< x_2> x_3 < \ldots > x_{2m+1}\). We write \({{\textbf {LD}}}^{\mathrm{alt\infty }}_{n,k}\) for the set of alternating Laguerre digraphs on the vertex set [n] with k paths using \(\infty \)\(\infty \) boundary conditions. Of course, there is a natural bijection between \({{\textbf {LD}}}^{\textrm{alt}}_{n,k}\) and \({{\textbf {LD}}}^{\mathrm{alt\infty }}_{n,k}\), by mapping vertices \(i \mapsto n+1-i\).

Now we shall define some new statistics on Laguerre digraphs which extend the crossing and nesting statistics on permutations that were defined in Sect. 3.2. We say that a quadruplet \(1\le i< j< k < l\le \infty \) forms a

  • lower crossing (lcross) if \(p(i) = k\) and \(p(j) = l\);

  • lower nesting (lnest) if \(p(j)=k\) and \(p(i) = l\).

Notice that in such a quadruplet, the vertex k must be either a peak or a double descent. When \(l < \infty \), these conditions could equivalently be written in terms of the successor function: a quadruplet is a lower crossing if \(i = s(k)\) and \(j = s(l)\), and a lower nesting if \(j = s(k)\) and \(i = s(l)\). But we have written them in terms of the predecessor function in order to handle smoothly the case \(l = \infty \), i.e. the case when j (resp. i) has in-degree 0 in G. This definition now allows us to define the index-refined lower crossing and nesting statistics for Laguerre digraphs, as a generalization of (3.6c,d):

$$\begin{aligned} \textrm{lcross}(k,G)= & \#\{ 1\le i<j<k<l\le \infty :\, p(i) = k \hbox { and } p(j) = l \}, \end{aligned}$$
(6.25a)
$$\begin{aligned} \textrm{lnest}(k,G)= & \#\{ 1\le i<j<k<l\le \infty :\, p(j) = k \hbox { and } p(i) = l \}. \end{aligned}$$
(6.25b)

Note that because these statistics are defined in terms of the index in third position (namely, k), we certainly have \(k < \infty \) (since \(k \in [n]\)). When the Laguerre digraph G has no paths and hence arises as the digraph of a permutation \(\sigma \), this definition manifestly coincides with the definitions (3.6c,d).

However, things are going to be more subtle for the upper crossings and nestings, because these statistics will be defined [cf. (3.6a,b)] in terms of the index in second position (namely, j), and there is then no guarantee that \(k < \infty \). Rather, we need to reckon with the possibility that \(i< j < k = l = \infty \), and this means that (at least in this case) we will be unable to distinguish between crossings and nestings. We therefore define a new statistic \(\textrm{ulev}\) that plays the role of \(\textrm{ucross}+ \textrm{unest}\). That is, for \(j\in [n]\) we define

$$\begin{aligned} \textrm{ulev}(j,G) \;=\; \#\{ i<j :\, j< s(i) \le \infty \hbox { and } j < s(j) \le \infty \} . \end{aligned}$$
(6.26)

We shall say that \(\textrm{ulev}(j,G)\) is the upper level of the vertex j. Note that \(\textrm{ulev}(j,G)\) can be nonzero only when j is either a valley or a double ascent. When the Laguerre digraph G has no paths and hence arises as the digraph of a permutation \(\sigma \), we have

$$\begin{aligned} \textrm{ulev}(j,G) \;=\; \textrm{ucross}(j,\sigma ) \,+\, \textrm{unest}(j,\sigma ). \end{aligned}$$
(6.27)

We can also define analogously a lower level for the vertex k:

$$\begin{aligned} \textrm{llev}(k,G) \;=\; \#\{ m<k :\, k< p(m) \le \infty \hbox { and } s(k) < k \}. \end{aligned}$$
(6.28)

But this definition is superfluous, because it is concocted to satisfy

$$\begin{aligned} \textrm{llev}(k,G) \; = \; \textrm{lcross}(k,G) \, + \, \textrm{lnest}(k,G); \end{aligned}$$
(6.29)

to see this it suffices to look at the two cases \(m=i\) (nesting) and \(m=j\) (crossing).

We now restrict attention to alternating Laguerre digraphs, and define a generating polynomial in two infinite families of indeterminates \({{\textsf {{\textbf {a}}}}}= ({\textsf{a}}_{\ell })_{\ell \ge 0}\) and \({{\textsf {{\textbf {b}}}}}= ({\textsf{b}}_{\ell ,\ell '})_{\ell ,\ell '\ge 0}\) that uses the crossing, nesting and level statistics:

$$\begin{aligned} \widetilde{Q}_{n,k}({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}},\lambda ) \;=\; \sum _{G \in {{\textbf {LD}}}^{\mathrm{alt\infty }}_{n,k}} \;\,\lambda ^{\textrm{cyc}(G)} \prod \limits _{i \in \textrm{Val}(G)} \! {\textsf{a}}_{\textrm{ulev}(i,G)} \prod \limits _{i \in \textrm{Peak}(G)} \!\! {\textsf{b}}_{\textrm{lcross}(i,G),\,\textrm{lnest}(i,G)},\nonumber \\ \end{aligned}$$
(6.30)

where \(\textrm{Val}(G)\) denotes the set of valleys of G and \(\textrm{Peak}(G)\) denotes the set of peaks of G. For \(k=0\), we have \({{\textbf {LD}}}^{\textrm{alt}}_{2n,0} \simeq {\mathfrak {S}}_{2n}^{\textrm{ca}}\), i.e. an alternating Laguerre digraph G with no paths is the digraph of a cycle-alternating permutation \(\sigma \), and we have

$$\begin{aligned} \widetilde{Q}_{2n,0} \;=\; \widehat{Q}_n, \end{aligned}$$
(6.31)

where \(\widehat{Q}_n\) is the second master polynomial for cycle-alternating permutations defined in (5.8) [31, (2.137)]. We therefore call \(\widetilde{Q}_{n,k}({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}},\lambda )\) the second master polynomial for alternating Laguerre digraphs.

Recall that there is a natural bijection between \({{\textbf {LD}}}^{\mathrm{alt\infty }}_{n,k}\) and \({{\textbf {LD}}}^{\textrm{alt}}_{n,k}\) by mapping vertices \(i \mapsto n+1-i\). This bijection sends cycle peaks to cycle valleys, path peaks to path valleys, and vice-versa. Thus, under the specializations \({\textsf{a}}_{\ell } = y_v\), \({\textsf{b}}_{\ell ,\ell '} = y_p\) and \(\lambda = 1+\alpha \), the polynomial \(\widetilde{Q}_{n,k}({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}},\lambda )\) is equal to the polynomial \({\widetilde{\textsf{L}}}^{(\alpha )\mathrm alt}({y_\textrm{v}},{y_\textrm{p}}, {y_\textrm{v}}, {y_\textrm{p}})_{n,k}\) obtained by substituting \({y_\textrm{p}}= {z_\textrm{p}}\) to \({y_\textrm{v}}\) and \({y_\textrm{v}}= {z_\textrm{v}}\) to \({y_\textrm{p}}\) in (6.13).

The main technical result of this subsection is that the polynomials \(\widetilde{Q}_{n,k}({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}},\lambda )\) satisfy the following recurrence:

Proposition 6.5

(Recurrence for second master polynomial for alternating Laguerre digraphs) The polynomials \(\widetilde{Q}_{n,k} ( {{{{\textbf {{\textsf {{a}}}}}}}, {{{\textbf {{\textsf {b}}}}}}}, \lambda )\) defined in (6.30) satisfy the recurrence

$$\begin{aligned} \widetilde{Q}_{n+1,k} \; = \; {\textsf{a}}_{k-1}\,\widetilde{Q}_{n,k-1} \,+\, (\lambda +k)\left( \sum _{i=0}^{k} {\textsf{b}}_{i,k-i} \right) \, \widetilde{Q}_{n,k+1}. \end{aligned}$$
(6.32)

Proof

In order to prove the recurrence (6.32), we first start with an alternating Laguerre digraph \(G\in {{\textbf {LD}}}^{\mathrm{alt\infty }}_{n+1,k}\). We then look at the status of the vertex \(n+1\), and for each possibility we consider the induced subgraph on the vertex set [n], call it \(G'\). (Clearly \(G'\) is a Laguerre digraph; we will also see that it is alternating, but that takes a bit more work to prove.) For each situation, we then count the number of the ways in which \(n+1\) could be inserted into \(G'\), and evaluate what this does to the weights.

Let us begin by observing that, for every \(i \in [n]\),

$$\begin{aligned} \textrm{lcross}(i,G)= & \textrm{lcross}(i,G'), \end{aligned}$$
(6.33a)
$$\begin{aligned} \textrm{lnest}(i,G)= & \textrm{lnest}(i,G'), \end{aligned}$$
(6.33b)
$$\begin{aligned} \textrm{ulev}(i,G)= & \textrm{ulev}(i,G'). \end{aligned}$$
(6.33c)

This is because, if the predecessor (resp. successor) of i in G is \(n+1\), then its predecessor (resp. successor) in \(G'\) is \(\infty \); and in the inequalities defining \(\textrm{lcross},\textrm{lnest},\textrm{ulev}\), the values \(n+1\) and \(\infty \) play identical roles. (That is why we have chosen here to use \(\infty \)\(\infty \) boundary conditions.) It follows that all vertices \(i \in [n]\) get the same weight \({\textsf{a}}_\ell \) or \({\textsf{b}}_{\ell ,\ell '}\) in G as they do in \(G'\). Therefore, we only need to worry about the weight associated to the vertex \(n+1\), as well as the possible change in the number of cycles.

We begin by considering the case when \(n+1\) is a valley. For this to happen, we must have \(p(n+1) = s(n+1) = \infty \); in other words, \(n+1\) is an isolated vertex in G. Removing \(n+1\), we see that the resulting digraph \(G'\) has \(k-1\) paths and is alternating. On the other hand if we begin with an alternating Laguerre digraph \(G'\in {{\textbf {LD}}}^{\mathrm{alt\infty }}_{n,k-1}\), there is exactly one way in which the vertex \(n+1\) can be inserted into \(G'\) as an isolated vertex. Note that, in G, the vertex \(n+1\) has upper level \(\textrm{ulev}(n+1,G) = k-1\): this is because, in (6.26) with \(j=n+1\), we have \(s(j) = \infty \) (because \(j=n+1\) is a valley), and the contributing vertices i are those that have \(s(i) = \infty \); this happens when (and only when) i (\(\ne j\)) is the end vertex of a path, and there are \(k-1\) such paths. Therefore, the vertex \(n+1\) gets a weight \({\textsf{a}}_{k-1}\) in its contribution to \(\widetilde{Q}_{n+1,k}\). Therefore, the cases in which \(n+1\) is a valley contribute the summand \({\textsf{a}}_{k-1}\,\widetilde{Q}_{n,k-1}\).

When \(n+1\) is a peak, its predecessor \(p(n+1)\) and successor \(s(n+1)\) lie in [n]; therefore, it cannot be the initial or final vertex of a path in G. If \(n+1\) is a peak belonging to a cycle of G, then removing it turns its component into a path and increases the number of paths by 1. If \(n+1\) is a peak belonging to a path of G (and hence an internal vertex of that path), removing it causes that path to be divided into two nonempty paths, and hence again increases the number of paths by 1. In both cases the resulting Laguerre digraph \(G'\) will be alternating, because the vertices that had \(n+1\) as predecessor or successor in G will now have \(\infty \) as their predecessor or successor in \(G'\), maintaining the required inequalities. Hence \(G'\in {{\textbf {LD}}}^{\mathrm{alt\infty }}_{n,k+1}\).

We now begin with an alternating Laguerre digraph \(G'\in {{\textbf {LD}}}^{\mathrm{alt\infty }}_{n,k+1}\), and count the number of ways in which \(n+1\) can be inserted as peak. To do this, we need to count the various possibilities in which the predecessor and successor of \(n+1\) can be chosen. The successor of \(n+1\) can be chosen from any of the \(k+1\) initial vertices of the paths. Let \(1\le f_0<f_1<\cdots < f_k \le n\) be the initial vertices of the paths of \(G'\), ordered in increasing order. If \(s(n+1) = f_i\), any resulting alternating Laguerre digraph G will have \(p(f_j) = \infty \) for all \(j \ne i\). In particular, for all \(j < i\), the quadruplets \(f_j< f_i< n+1 < \infty \) will be lower nestings; and these will be the only lower nestings with third index \(n+1\). Similarly, for all \(j > i\), the quadruplets \(f_i< f_j< n+1 < \infty \) will be lower crossings; and these will be the only lower crossings with third index \(n+1\). Therefore, we will have \(\textrm{lnest}(n+1, G) = i\) and \(\textrm{lcross}(n+1, G) = k-i\). Thus, whenever \(s(n+1) = f_i\) (\(0 \le i\le k\)), the vertex \(n+1\) gets weight \({\textsf{b}}_{i,k-i}\) in G.

The predecessor of \(n+1\) can be chosen from any of the \(k+1\) final vertices of the paths. However, for each choice of successor \(f_i\), there is exactly one choice of final vertex that forms a cycle (namely, when the successor and predecessor vertices of \(n+1\) are the initial and final vertices of the same path); in this situation we get an additional weight \(\lambda \). In the other k cases we get a weight 1. Thus, the case when \(n+1\) is a peak contributes the summand \((\lambda +k)\left( \sum _{i=0}^{k} {\textsf{b}}_{i,k-i} \right) \, \widetilde{Q}_{n,k+1}\). \(\square \)

The recurrence (6.32) combined with Proposition 2.1 yields:

Theorem 6.6

(Generalized Jacobi–Rogers polynomials) The generalized Jacobi–Rogers polynomial \(J_{n,k}({{\varvec{\alpha }}},{{\varvec{0}}})\) with weights

$$\begin{aligned} \alpha _n \;=\; (\lambda + n-1) {\textsf{a}}_{n-1} \biggl ( \sum _{\ell =0}^{n-1} {\textsf{b}}_{\ell ,n-1-\ell } \biggr ), \end{aligned}$$
(6.34)

[cf. (5.10)] satisfies

$$\begin{aligned} \widetilde{Q}_{n,k}( {{{\textsf {{\textbf {a}}}}}, {{\textsf {{\textbf {b}}}}}}, \lambda ) \;=\; \left( \prod \limits _{i=0}^{k-1}{\textsf{a}}_i \right) J_{n,k}({{\varvec{\alpha }}}, {{\varvec{0}}}), \end{aligned}$$
(6.35)

where \(\widetilde{Q}_{n,k}( {{{\textsf {{\textbf {a}}}}}, {{\textsf {{\textbf {b}}}}}}, \lambda )\) is defined in (6.30).

Since the J-fraction in Theorem 6.6 has \({{\varvec{\gamma }}}= {{\varvec{0}}}\), the even and odd submatrices of \(\textsf{J}({{\varvec{\alpha }}}, {{\varvec{0}}})\) can be interpreted by (2.18) as being the generalized Stieltjes–Rogers polynomials of the first and second kinds for the second master S-fraction for cycle-alternating permutations, (5.9)/(5.10):

Corollary 6.7

(Generalized Stieltjes–Rogers polynomials) With \({{\varvec{\alpha }}}\) given by (6.34), we have

$$\begin{aligned} \widetilde{Q}_{2n,2k}( {{{\textsf {{\textbf {a}}}}}, {{\textsf {{\textbf {b}}}}}}, \lambda )= & \left( \prod \limits _{i=0}^{2k-1}{\textsf{a}}_i \right) S_{n,k}({{\varvec{\alpha }}}), \end{aligned}$$
(6.36a)
$$\begin{aligned} \widetilde{Q}_{2n+1,2k+1}( {{{\textsf {{\textbf {a}}}}}, {{\textsf {{\textbf {b}}}}}}, \lambda )= & \left( \prod \limits _{i=0}^{2k}{\textsf{a}}_i \right) S'_{n,k}({{\varvec{\alpha }}}). \end{aligned}$$
(6.36b)

6.5 Specialization to the case of Theorems 5.1 and 5.2

By specializing Corollary 6.7, we can obtain the generalized Stieltjes–Rogers polynomials corresponding to the S-fractions of Theorems 5.1 and 5.2. To do this, we will first need to extend the concepts of records and antirecords from permutations to Laguerre digraphs. This extension will be motivated by [31, Lemma 2.10], which we have recalled in Lemma 4.3.

We now extend the concepts of record and antirecord from permutations to arbitrary words in a totally ordered alphabet:

Definition 6.8

Let \(w_1 \ldots w_n\) be a word in a totally ordered alphabet. Then:

  1. (a)

    i is a record position (and \(w_i\) is a record value) in case, for all \(j < i\), we have \(w_j < w_i\).

  2. (b)

    i is an antirecord position (and \(w_i\) is an antirecord value) in case, for all \(j > i\), we have \(w_j > w_i\).

When the word \(w_1 \ldots w_n\) is a permutation of [n], these concepts are connected as follows:

Lemma 6.9

Let \(\sigma \) be a permutation of [n], and let \(\sigma ^{-1}\) be the inverse permutation. Then:

  1. (a)

    i is a record position in the word \(\sigma (1) \,\ldots \, \sigma (n)\) if and only if i is an antirecord value in the word \(\sigma ^{-1}(1) \,\ldots \, \sigma ^{-1}(n)\).

  2. (b)

    i is an antirecord position in the word \(\sigma (1) \,\ldots \, \sigma (n)\) if and only if i is a record value in the word \(\sigma ^{-1}(1) \,\ldots \, \sigma ^{-1}(n)\).

Proof

  1. (a)

    By definition, i is a record position in the word \(\sigma (1) \,\ldots \, \sigma (n)\) in case the following holds true: whenever \(j < i\), we have \(\sigma (j) < \sigma (i)\). Similarly, i is an antirecord value in the word \(\sigma ^{-1}(1) \,\ldots \, \sigma ^{-1}(n)\) in case the following holds true: whenever \(k > \sigma (i)\), we have \(\sigma ^{-1}(k) > i\). Defining \(j = \sigma ^{-1}(k)\), this latter statement can be rewritten as: whenever \(\sigma (j) > \sigma (i)\), we have \(j > i\). For each pair \(i \ne j\), the third statement is the contrapositive of the first.

  2. (b)

    The proof is similar.

\(\square \)

Using Lemma 6.9, we can rewrite Lemma 4.3 as follows:

Lemma 6.10

Let \(\sigma \) be a permutation.

  1. (a)

    If i is a cycle valley or cycle double rise, then i is an antirecord value in the word \(\sigma ^{-1}(1) \,\ldots \, \sigma ^{-1}(n)\) if and only if \(\textrm{unest}(i,\sigma ) = 0\).

  2. (b)

    If i is a cycle peak or cycle double fall, then i is a record value in the word \(\sigma ^{-1}(1) \,\ldots \, \sigma ^{-1}(n)\) if and only if \(\textrm{lnest}(i,\sigma ) = 0\).

We now generalize Lemma 6.10(b) from permutations to Laguerre digraphs. To do this, we first observe that to any Laguerre digraph G on the vertex set [n], we can associate a predecessor word \(p(1) \,\ldots \, p(n)\) and a successor word \(s(1) \,\ldots \, s(n)\), each taking values in the totally ordered alphabet \([n] \cup \{\infty \}\). Of course, if G is the digraph associated to a permutation \(\sigma \), then the predecessor word is \(\sigma ^{-1}(1) \,\ldots \, \sigma ^{-1}(n)\) and the successor word is \(\sigma (1) \,\ldots \, \sigma (n)\), which of course take values in [n]. We then have the following generalization of Lemma 6.10(b):

Lemma 6.11

Let G be a Laguerre digraph on the vertex set [n]. If k is a peak or double descent, then k is a record value in the predecessor word \(p(1) \,\ldots \, p(n)\) if and only if \(\textrm{lnest}(k,G) = 0\).

Proof

Since k is a peak or double descent, we have \(s(k)< k < \infty \). Therefore, k has out-degree 1 in G. It follows that the letter k occurs exactly once in the predecessor word \(p(1) \,\ldots \, p(n)\): namely, \(k = p(j)\) if and only if \(j = s(k)\).

By definition, k is a record value in the predecessor word \(p(1) \,\ldots \, p(n)\) in case, for all \(i < s(k)\), we have \(p(i) < k\). Equivalently, k is a record value in the predecessor word \(p(1) \,\ldots \, p(n)\) in case there does not exist \(i < s(k)\) such that \(p(i) > k\) (equality \(p(i) = k\) is excluded because it would imply \(i = s(k)\)). But, by the definition (6.25b) of \(\textrm{lnest}\), this is precisely the statement that \(\textrm{lnest}(k,G) = 0\). \(\square \)

With these preliminaries, we are now able to state the generalized Stieltjes–Rogers polynomials corresponding to the S-fractions of Theorems 5.1 and 5.2. Let us start with Theorem 5.1, which concerns the polynomials (5.1) specialized to \(y_{\textrm{e}}=v_{\textrm{e}}\) and \(y_{\textrm{o}}=v_{\textrm{o}}\): this means that for cycle peaks (but not for cycle valleys) we are distinguishing between those that are antirecords (i.e. antirecord positions) and those that are not. By Lemma 6.9(b), i is an antirecord position in \(\sigma \) if and only if i is a record value in \(\sigma ^{-1}\). We then generalize the latter condition to Laguerre digraphs G on the vertex set [n] by defining

$$\begin{aligned} & \textrm{Arecpeak}^\star (G) \;{\mathop {=}\limits ^\textrm{def}}\; \{ i \in [n] :\, i \in \textrm{Peak}(G) \hbox { and } \nonumber \\ & \qquad i \ \hbox { is a record value in the predecessor word}\ p(1) \,\ldots \, p(n) \}, \end{aligned}$$
(6.37a)
$$\begin{aligned} & \textrm{Nrpeak}^\star (G) \;{\mathop {=}\limits ^\textrm{def}}\; \{ i \in [n] :\, i \in \textrm{Peak}(G) \hbox { and } \nonumber \\ & \qquad i \,\hbox {is not a record value in the predecessor word}\, p(1) \,\ldots \, p(n) \}, \qquad \end{aligned}$$
(6.37b)

where we recall that we have defined

$$\begin{aligned} \textrm{Peak}(G)&{\mathop {=}\limits ^\textrm{def}}&\{ i \in [n] :\, i\ \hbox { is a peak in}\ G\,\, \hbox {using } \infty {-}\infty \hbox {boundary conditions} \}, \qquad \qquad \end{aligned}$$
(6.38a)
$$\begin{aligned} \textrm{Val}(G)&{\mathop {=}\limits ^\textrm{def}}&\{ i \in [n] :\, i \ \hbox {is a valley in}\ G\,\, \hbox {using }\ \infty {-}\infty \hbox {boundary conditions} \}. \qquad \qquad \end{aligned}$$
(6.38b)

We then define

$$\begin{aligned} \textrm{eareccpeakeven}^\star (G)&{\mathop {=}\limits ^\textrm{def}}&|\textrm{Arecpeak}^\star (G) \cap \textrm{Even}|, \end{aligned}$$
(6.39a)
$$\begin{aligned} \textrm{nrcpeakeven}^\star (G)&{\mathop {=}\limits ^\textrm{def}}&|\textrm{Nrpeak}^\star (G) \cap \textrm{Even}|, \end{aligned}$$
(6.39b)
$$\begin{aligned} \textrm{cvaleven}^\star (G)&{\mathop {=}\limits ^\textrm{def}}&|\textrm{Val}(G) \cap \textrm{Even}|, \end{aligned}$$
(6.39c)

and likewise for the odd ones. (The names for these quantities are chosen to coincide with the previous ones when G is the digraph arising from a permutation, even though the names may seem a bit bizarre when compared with the actual definitions; we have used a star to stress this change of emphasis.) Having done this, we then extend the definition (5.1), specialized to \(y_{\textrm{e}}=v_{\textrm{e}}\) and \(y_{\textrm{o}}=v_{\textrm{o}}\), from permutations to Laguerre digraphs:

$$\begin{aligned} & \hspace{-6mm} \widehat{Q}_{n,k}(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},\lambda ) \nonumber \\ & \quad = \sum _{G \in {{\textbf {LD}}}^{\mathrm{alt\infty }}_{n,k}} x_{\textrm{e}}^{\textrm{eareccpeakeven}^\star (G)} y_{\textrm{e}}^{\textrm{cvaleven}^\star (G)} u_{\textrm{e}}^{\textrm{nrcpeakeven}^\star (G)} \, \nonumber \\ & \qquad \times \, x_{\textrm{o}}^{\textrm{eareccpeakodd}^\star (G)} y_{\textrm{o}}^{\textrm{cvalodd}^\star (G)} u_{\textrm{o}}^{\textrm{nrcpeakodd}^\star (G)} \lambda ^{\textrm{cyc}(G)} . \end{aligned}$$
(6.40)

We can then state:

Theorem 6.12

(Generalized Stieltjes–Rogers polynomials for Theorem 5.1) With \({{\varvec{\alpha }}}\) given by (5.4), we have

$$\begin{aligned} \widehat{Q}_{2n,2k}(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},\lambda )= & y_{\textrm{e}}^k y_{\textrm{o}}^k \, S_{n,k}({{\varvec{\alpha }}}), \end{aligned}$$
(6.41a)
$$\begin{aligned} \widehat{Q}_{2n+1,2k+1}(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},\lambda )= & y_{\textrm{e}}^k y_{\textrm{o}}^{k+1} \, S'_{n,k}({{\varvec{\alpha }}}). \end{aligned}$$
(6.41b)

As preparation for this proof, we need a generalization of Lemma 4.2 from cycle-alternating permutations to alternating Laguerre digraphs:

Lemma 6.13

If G is an alternating Laguerre digraph on the vertex set [N], then

$$\begin{aligned} \hbox {valleys:}&\!\!&\textrm{ulev}(i,G) \;\equiv \; i-1 \, \pmod {2}, \end{aligned}$$
(6.42a)
$$\begin{aligned} \hbox {peaks:}&\!\!&\textrm{llev}(i,G) \;\equiv \; i \, \pmod {2}, \end{aligned}$$
(6.42b)

for all \(i \in [N]\). Here \(\textrm{ulev}\) and \(\textrm{llev}\) were defined in (6.26) and (6.28), respectively.

We introduce some new notation before providing the proof. Given a Laguerre digraph G on the vertex set [n] and a set \(S\subseteq [n]\), let \(\left. G\right| _S\) denote the induced subgraph on the vertex set S (which is, of course, also a Laguerre digraph). Also, let \(h^{S}\) denote the number of paths in the graph \(\left. G\right| _S\).

Proof of Lemma 6.13

To begin with, let G be any Laguerre digraph, not necessarily alternating. Let j be a valley in G. Then, in the graph \(\left. G\right| _{[j]}\), j is an isolated vertex, i.e., \(s(j) = p(j) = \infty \). From the definition (6.26) we have

$$\begin{aligned} \textrm{ulev}(j, \left. G\right| _{[j]})= & \#\{ i<j :\, s(i) = \infty \}\nonumber \\= & h^{[j]} -1, \end{aligned}$$
(6.43)

where the first equality holds because j is the largest-numbered vertex in \(\left. G\right| _{[j]}\), so that \(s(i) > j\) implies \(s(i) = \infty \); and the second equality follows by noticing that the vertices i with \(s(i) = \infty \) correspond to the final vertices of the paths in \(\left. G\right| _{[j]}\) different from j.

Similarly, when k is a peak in G, it follows from (6.28) that

$$\begin{aligned} \textrm{llev}(k, \left. G\right| _{[k]})= & \#\{m<k :\, p(m) = \infty \}\nonumber \\= & h^{[k]}, \end{aligned}$$
(6.44)

where the vertices m with \(p(m) = \infty \) correspond to the initial vertices of the paths in \(\left. G\right| _{[k]}\).

Next, observe that

$$\begin{aligned} h^{[i]}= & h^{[i-1]} + 1 \quad \hbox {when}\ i\ \hbox { is a valley}, \end{aligned}$$
(6.45a)
$$\begin{aligned} h^{[i]}= & h^{[i-1]} - 1 \quad \hbox {when} \ i \ \hbox { is a peak}. \end{aligned}$$
(6.45b)

The first formula is true because a valley i is an isolated vertex in \(\left. G\right| _{[i]}\), and removing it decreases the number of paths by 1. On the other hand, if i is a peak, it has both a predecessor and a successor in \(\left. G\right| _{[i]}\); so if i is a cycle peak, removing it changes a cycle to a path, whereas if i is a path peak, removing it splits the path into two paths; either way the number of paths is increased by 1.

Now let G be an alternating Laguerre digraph on the vertex set [N], with k paths. Consider the lattice path \(\omega \) starting at (0, 0) and ending at (Nk) with steps \(s_i = (1,1)\) when i is a valley and \(s_i = (1,-1)\) when i is a peak. By definition, the heights \(h_i\) in the path \(\omega \) satisfy the same recurrence (6.45b) satisfied by the \(h^{[i]}\); and of course \(h_0 = h^{[0]} = 0\) (since \([0] = \emptyset \)). It follows that \(h_i = h^{[i]} \ge 0\), and hence that \(\omega \) is a partial Dyck path. This also implies that

$$\begin{aligned} h^{[i]} \;\equiv \; i \pmod {2}. \end{aligned}$$
(6.46)

The proof of (6.42b) is completed by combining (6.43), (6.44) and (6.46) and noticing that \(\textrm{ulev}(i,\left. G\right| _{[i]} ) = \textrm{ulev}(i,G) \) and \(\textrm{llev}(i,\left. G\right| _{[i]} ) = \textrm{llev}(i,G) \). \(\square \)

Proof of Theorem 6.12

We obtain the polynomials \(\widehat{Q}_{n,k}(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},\lambda )\) defined in (6.40) by using Lemmas 6.11 and 6.13 and Eq. (6.29), and specializing the polynomials \(\widetilde{Q}_{n,k}({{\textsf {{\textbf {a}}}}},{{\textsf {{\textbf {b}}}}},\lambda )\) defined in (6.30) to

$$\begin{aligned} {\textsf{a}}_{\ell }= & {\left\{ \begin{array}{ll} y_{\textrm{o}}& \text {if} \ \ell \ \text { is even} \\ y_{\textrm{e}}& \text {if } \ \ell \ \text { is odd} \\ \end{array}\right. }, \end{aligned}$$
(6.47a)
$$\begin{aligned} {\textsf{b}}_{\ell ,\ell '}= & {\left\{ \begin{array}{ll} x_{\textrm{e}}& \text {if} \ \ell ' = 0 \ \text {and} \ell +\ell ' \text {is even} \\ u_{\textrm{e}}& \text {if} \ \ell ' \ge 1 \ \text {and } \ \ell +\ell ' \ \text {is even} \\ x_{\textrm{o}}& \text {if} \ \ell ' = 0 \ \text {and} \ \ell +\ell ' \ \text {is odd} \\ u_{\textrm{o}}& \text {if} \ \ell ' \ge 1 \ \text {and} \ \ell +\ell ' \ \text {is odd} \end{array}\right. }. \end{aligned}$$
(6.47b)

(This is just (5.11) with all the pq variables set to 1.) Inserting these into Corollary 6.7 completes the proof of Theorem 6.12.\(\square \)

Next we show the pq-generalization of all this. We extend the definition (5.5), specialized to \(y_{\textrm{e}}=v_{\textrm{e}}\), \(y_{\textrm{o}}=v_{\textrm{o}}\), \(p_{+1} = q_{+1}\) and \(p_{+2}=q_{+2}\), from permutations to Laguerre digraphs:

$$\begin{aligned} & \hspace{-6mm} \widehat{Q}_{n,k}(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}},p_{-1},p_{-2},p_{+1},p_{+2},q_{-1},q_{-2},\lambda ) \nonumber \\ & \quad = \sum _{G \in {{\textbf {LD}}}^{\mathrm{alt\infty }}_{n,k}} x_{\textrm{e}}^{\textrm{eareccpeakeven}^\star (G)} y_{\textrm{e}}^{\textrm{cvaleven}^\star (G)} u_{\textrm{e}}^{\textrm{nrcpeakeven}^\star (G)} \, \nonumber \\ & \qquad \quad \times \, x_{\textrm{o}}^{\textrm{eareccpeakodd}^\star (G)} y_{\textrm{o}}^{\textrm{cvalodd}^\star (G)} u_{\textrm{o}}^{\textrm{nrcpeakodd}^\star (G)} \, \nonumber \\ & \qquad \quad \times \;\, p_{-1}^{\textrm{lcrosscpeakeven}^\star (G)} q_{-1}^{\textrm{lnestcpeakeven}^\star (G)} p_{+2}^{\textrm{ulevcvaleven}^\star (G)} \, \nonumber \\ & \qquad \quad \times \;\, p_{-2}^{\textrm{lcrosscpeakodd}^\star (G)} q_{-2}^{\textrm{lnestcpeakodd}^\star (G)} p_{+1}^{\textrm{ulevcvalodd}^\star (G)} , \end{aligned}$$
(6.48)

where

$$\begin{aligned} \textrm{lcrosscpeakeven}^\star (G) \;=\; \sum _{k\in \textrm{Peak}(G) \,\cap \,\textrm{Even}} \textrm{lcross}(k,G), \end{aligned}$$
(6.49)

and likewise for the others. We can then state:

Theorem 6.14

(Generalized Stieltjes–Rogers polynomials for Theorem 5.2) With \({{\varvec{\alpha }}}\) given by (5.7), we have

$$\begin{aligned} & \widehat{Q}_{2n,2k}(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}}, p_{-1},q_{-1},p_{+2},p_{-2},q_{-2},p_{+1},\lambda )\nonumber \\ & \; \quad = \; p_{+1}^{k(k-1)} p_{+2}^{k^2} \, y_{\textrm{e}}^k y_{\textrm{o}}^k \, S_{n,k}({{\varvec{\alpha }}}),\qquad \qquad \quad \end{aligned}$$
(6.50a)
$$\begin{aligned} & \widehat{Q}_{2n+1,2k+1}(x_{\textrm{e}},y_{\textrm{e}},u_{\textrm{e}},x_{\textrm{o}},y_{\textrm{o}},u_{\textrm{o}}, p_{-1},q_{-1},p_{+2},p_{-2},q_{-2},p_{+1},\lambda )\nonumber \\ & \; \quad = \; p_{+1}^{k(k+1)} p_{+2}^{k^2} \, y_{\textrm{e}}^k y_{\textrm{o}}^{k+1} \, S'_{n,k}({{\varvec{\alpha }}}).\qquad \qquad \quad \end{aligned}$$
(6.50b)

Proof

The proof of Theorem 6.14 is almost identical to that of Theorem 6.12, but uses the full specialization (5.11b). \(\square \)