\section{Ladder values}\label{sec:5} This section computes $g_n(-2)$ in closed form (the simpler value $g_n(-1)$, needed only for $n = p+2$, is computed in Appendix~\ref{sec:A}). The first two lemmas express a ladder value as a sum over $k$ partial derangements of a determinant; they use only classical results. Lemma~\ref{lem:5.3} expands the determinant into forests and is used for $k = 1$ in Appendix~\ref{sec:A}. Lemma~\ref{lem:5.4}, an elementary sign cancellation, reduces these sums to a short list of configurations. \subsection{Ladder values as sums of determinants} For partial derangements $\sigma_1, \dots, \sigma_k$ that are pairwise arc-disjoint, let $F = \sigma_1 \cup \dots \cup \sigma_k$ and let $d_v$ be the number of $i$ with $v \in S_{\sigma_i}$, so that $d_v$ is the out-degree (and the in-degree) of $v$ in $F$. For a directed multigraph $F$ on $V$ let $L_F = D_F - A_F$ be its Laplacian, where $D_F$ is the diagonal matrix of the out-degrees and $A_F$ the adjacency matrix (with multiplicities), and for a directed graph $G$ let $t(G)$ be the number of spanning arborescences of $G$ oriented towards a fixed vertex. Put \[ \lambda(d) = \prod_{i=1}^{d} \frac{1}{n-1-i}, \qquad\text{so } \lambda(0) = 1,\ \lambda(1) = \frac{1}{n-2},\ \lambda(2) = \frac{1}{(n-2)(n-3)} . \] \begin{lemma}\label{lem:5.1} Let $0 \le k \le n-2$. Then \[ g_n(-k) = \frac{(-1)^k\, ((n-2)!)^n}{n^2\, k!\, (n-2-k)!}\; S_n^{(k)} \] with \[ S_n^{(k)} = \sum_{(\sigma_1, \dots, \sigma_k)} \prod_{i=1}^k (-1)^{c(\sigma_i)} \prod_{v \in V} \lambda(d_v)\, \det(nI - L_F), \] where the sum runs over all $k$-tuples of pairwise arc-disjoint partial derangements of $V$. \end{lemma} \begin{proof} Since $t = -k$ is a simple root of $t(t+1)\cdots(t+n-2)$, one has $g_n(-k) = j_n'(-k)/\prod_{i \ne k}(i-k)$, with $i$ running over $0, \dots, n-2$, and $\prod_{i \ne k}(i - k) = (-1)^k k!\,(n-2-k)!$. In the ring $R$ of Section~\ref{sec:2}, $\det(I-X)^{-t} = \exp(-t \log \det(I - X))$, so by the proof of Lemma~\ref{lem:2.2}, which gives $j_n(t) = [x^E] \exp\bigl(t \sum_H \mathrm{ec}(H) x^H\bigr)$, \[ j_n'(-k) = [x^E]\Bigl(\det(I-X)^k \cdot \sum_H \mathrm{ec}(H)\, x^H\Bigr) . \] Expanding the $k$ factors by \eqref{eq:2.2}, a term survives if and only if the $k$ partial derangements are pairwise arc-disjoint and the complement $E \setminus F$ is one of the sets $H$. The complement is Eulerian, and if it is not connected, its number of Eulerian circuits is $0$. Hence $j_n'(-k) = \sum \prod_i (-1)^{c(\sigma_i)}\, \mathrm{ec}(K_n^* - F)$. Every vertex has out-degree $n-1-d_v \ge n-1-k \ge 1$ in $K_n^* - F$, and by the BEST theorem \cite[Theorem~6 and (6.4)]{BEST}, $\mathrm{ec}(K_n^* - F) = t(K_n^* - F) \prod_v (n-2-d_v)!$, and $t(K_n^* - F)$ does not depend on the chosen vertex (it is $0$ if $K_n^* - F$ is not connected, so the formula also covers that case). Finally $\prod_v (n-2-d_v)! = ((n-2)!)^n \prod_v \lambda(d_v)$, and Lemma~\ref{lem:5.2} gives $t(K_n^* - F) = \det(nI - L_F)/n^2$. \end{proof} \begin{lemma}\label{lem:5.2} For every Eulerian graph $F \subseteq K_n^*$, $t(K_n^* - F) = \det(nI - L_F)/n^2$. \end{lemma} \begin{proof} Let $G = K_n^* - F$ and $L_G$ its Laplacian. The Laplacian of $K_n^*$ is $nI - J$, so $L_G = nI - J - L_F$. Since $G$ is Eulerian, $L_G$ has zero row sums and zero column sums. Hence $\det L_G = 0$, and $L_G \adj(L_G) = \adj(L_G) L_G = 0$. If $L_G$ has rank $n-1$, its kernel and its left kernel are spanned by $\mathbf 1$, so the columns and the rows of $\adj(L_G)$ are constant; otherwise $\adj(L_G) = 0$. In both cases all cofactors of $L_G$ are equal. By the matrix-tree theorem for directed graphs \cite[Theorem~7]{BEST} the diagonal cofactors are $t(G)$, so the adjugate of $L_G$ is $t(G)\,J$. With $J = \mathbf 1 \mathbf 1^T$ the matrix determinant lemma, in the form $\det(A + \mathbf u \mathbf v^T) = \det A + \mathbf v^T \adj(A)\, \mathbf u$ valid for every square $A$, gives $\det(L_G + J) = 0 + \mathbf 1^T \adj(L_G)\, \mathbf 1 = n^2\, t(G)$. Here $L_G + J = nI - L_F$. \end{proof} The determinant $\det(nI - L_F)$ couples the $k$ partial derangements. For $k = 1$ the next lemma, a signed form of the matrix-forest theorem (see \cite[(2)]{Chaiken} for the general all-minors version), makes it a sum of local terms; for $k = 2$ the Leibniz formula is used instead (proof of Theorem~\ref{thm:5.5}). A \emph{forest} in a directed multigraph $F$ is a set $\Phi$ of arcs of $F$ with at most one arc leaving each vertex and no directed cycle. \begin{lemma}\label{lem:5.3} For every directed multigraph $F$ on $V$ without loops and every number $c$, \[ \det(cI - L_F) = \sum_{\Phi} (-1)^{|\Phi|}\, c^{\,n - |\Phi|}, \] the sum over all forests $\Phi$ of $F$ (parallel arcs are distinguished). \end{lemma} \begin{proof} Row $v$ of $cI - L_F$ is $c e_v - \sum_{(v,w) \in F} (e_v - e_w)$, where $e_v$ is the unit row vector. Expanding the determinant by multilinearity in the rows, each vertex $v$ chooses either $c e_v$ or one arc $(v,w)$ of $F$ with the row $e_w - e_v$. The chosen arcs form a set $\Phi$ with at most one arc leaving each vertex. If $\Phi$ contains a directed cycle, the rows of its vertices sum to $0$, and the determinant vanishes. Otherwise order the vertices so that every chosen arc points to an earlier vertex; then the matrix is triangular with diagonal entries $c$ (unchosen vertices) and $-1$ (chosen vertices), and the determinant is $(-1)^{|\Phi|} c^{n - |\Phi|}$. \end{proof} \subsection{Sign cancellation in sums over partial derangements} The following lemma is the source of all simplifications below. It evaluates a weighted sum over all partial derangements that contain a prescribed set of arcs, and it shows that the sum vanishes as soon as two paths are prescribed. Each vertex $v$ carries two weights, $w_1(v)$ if the partial derangement moves $v$ and $w_0(v)$ if it fixes $v$. \begin{lemma}\label{lem:5.4} Let $P$ be a set of arcs of $K_n^*$ forming vertex-disjoint directed paths and cycles, with $q$ paths, $c(P)$ cycles and vertex set $V(P)$, and let $w_0, w_1$ be weights on $V$. The sum \[ \Lambda_w(P) := \sum_{\sigma \supseteq P} (-1)^{c(\sigma)} \prod_{v \in S_\sigma} w_1(v) \prod_{v \notin S_\sigma} w_0(v), \] where $\sigma$ runs over the partial derangements of $V$ containing $P$, satisfies \[ \Lambda_w(P) = (-1)^{c(P) + q} \prod_{v \in V(P)} w_1(v) \cdot \begin{cases} \prod_{v \in R} \omega(v) - \sum_{u \in R} w_1(u) \prod_{v \in R \setminus \{u\}} \omega(v) & \text{if } q = 0, \\ \prod_{v \in R} \omega(v) & \text{if } q = 1, \\ 0 & \text{if } q \ge 2, \end{cases} \] where $R = V \setminus V(P)$ and $\omega(v) = w_0(v) + w_1(v)$. If two arcs of a set $P$ of arcs leave the same vertex or enter the same vertex, the sum over $\sigma \supseteq P$ is empty. \end{lemma} \begin{proof} Every vertex of $V(P)$ lies in $S_\sigma$, and the cycles of $P$ are cycles of $\sigma$. Contract each path of $P$, from its first vertex to its last, to a single element. Then $\sigma$ corresponds to a permutation $\pi$ of the set $Y$ of the $q$ contracted paths and the vertices outside $V(P)$: $\pi(y)$ is the element of $Y$ that contains $\sigma$ of the last vertex of $y$, and conversely $\sigma$ is determined by $\pi$ and $P$. A fixed point of $\pi$ is a vertex outside $S_\sigma$, or a path closed into a cycle of $\sigma$. Each cycle of $\pi$ that is not a fixed vertex corresponds to a cycle of $\sigma$. Give the elements of $Y$ the weights $f(u) = w_1(u)$ for vertices and $f = 1$ for paths (the factors $w_1$ of the path vertices are taken out in front). Then $(-1)^{c(\sigma)} \prod_v w(v) = (-1)^{c(P)} \prod_{v \in V(P)} w_1(v) \prod_C \mathrm{wt}(C)$ over the cycles $C$ of $\pi$, where the weight $\mathrm{wt}(C)$ is $-\prod_{y \in C} f(y)$, except for fixed points: a fixed vertex $u$ has weight $w_0(u) = -w_1(u) + \omega(u)$, and a fixed path has weight $-1$. Hence the weight of every cycle is $-\prod_{y \in C} f(y)$ plus a correction $r(y)$ for fixed points, with $r(u) = \omega(u)$ for vertices and $r = 0$ for paths. Expanding the product of the corrections, \[ \Lambda_w(P) = (-1)^{c(P)} \prod_{v \in V(P)} w_1(v) \sum_{A \subseteq Y} \prod_{y \in A} r(y) \prod_{y \notin A} f(y) \sum_{\pi \in \operatorname{Sym}(Y \setminus A)} (-1)^{c(\pi)} . \] Here $c(\pi)$ counts all cycles of $\pi$, fixed points included, so the inner sum is the value of $x(x+1)\cdots(x+N-1)$ at $x = -1$, that is, $(-1)\cdot 0 \cdot 1 \cdots (N-2)$ for $N = |Y \setminus A|$, that is, $1$ for $N = 0$, $-1$ for $N = 1$ and $0$ for $N \ge 2$. Paths have $r = 0$ and must lie outside $A$, so $q \ge 2$ gives $0$. For $q = 1$ the only term is $Y \setminus A = \{\text{the path}\}$. For $q = 0$ one gets the term $A = Y$ and the terms with one vertex outside $A$. The last statement is clear, since a partial derangement has one arc leaving and one arc entering each moved vertex. \end{proof} It is convenient to read the bracket as a sum over \emph{marks}. For $q = 0$ a layer may carry no mark or one mark on a vertex $u \notin V(P)$; for $q = 1$ it carries no mark. Every vertex then has a \emph{layer factor}: $w_1(v)$ on $V(P)$, $\omega(v)$ off $V(P)$ and unmarked, and $-w_1(v)$ on the marked vertex. The bracket is the sum over the allowed marks of the product of the layer factors off $V(P)$. With this reading, each prescribed path costs a factor $-1$, and each layer carries at most one path or one mark. For $k = 2$ the weight of a vertex depends on both partial derangements, and Lemma~\ref{lem:5.4} is applied in the following form. A layer factor is a linear function of the pair $(w_0(v), w_1(v))$: write it as $\varphi_v(0) w_0(v) + \varphi_v(1) w_1(v)$, so that $\varphi_v = (0, 1)$ on $V(P)$, $(1, 1)$ off $V(P)$ and unmarked, and $(0, -1)$ on the marked vertex. Let $P$, $P'$ be two arc sets as in Lemma~\ref{lem:5.4} and let $h_v(s, t)$, for $s, t \in \{0, 1\}$, be numbers. Then \begin{equation}\label{eq:5.1} \sum_{\sigma \supseteq P,\ \tau \supseteq P'} (-1)^{c(\sigma) + c(\tau)} \prod_{v} h_v(s_v, t_v) = (-1)^{c(P) + q + c(P') + q'} \sum_{\mu, \mu'} \prod_v \psi_v, \end{equation} with $\psi_v = \sum_{s, t \in \{0, 1\}} \varphi_v(s)\, \varphi'_v(t)\, h_v(s, t)$, where $s_v = [v \in S_\sigma]$, $t_v = [v \in S_\tau]$, $\mu$ and $\mu'$ run over the allowed marks of the two layers, and $\varphi$, $\varphi'$ are the coefficients of the layer factors of $(P, \mu)$ and $(P', \mu')$. Indeed, both sides are linear in each of the functions $h_v$, so it suffices to take $h_v(s, t) = w_v(s)\, w'_v(t)$, and then the left side is $\Lambda_w(P)\, \Lambda_{w'}(P')$. \subsection{The value \texorpdfstring{$g_n(-2)$}{g\_n(-2)}} For $k = 2$ Lemmas~\ref{lem:5.1}, \ref{lem:5.2} and~\ref{lem:5.4} lead to a generating function. Put \[ a = \frac{1}{n-2}, \quad \alpha = \frac{1}{n-3}, \quad \beta = \frac{1}{(n-2)(n-3)}, \quad x = \alpha z, \quad y = \beta z, \] so that $\alpha = a + \beta = (n-2)\beta$. \begin{theorem}\label{thm:5.5} For $n \ge 4$, \[ g_n(-2) = \frac{((n-2)!)^n}{2 n^2 (n-4)!}\, S_n, \qquad S_n = n!\,[z^n]\; e^{\frac{n(n-1)}{n-3} z}\, \frac{1-2y}{(1+x)^3}\, \mathcal D(z), \] where \begin{align*} \mathcal D &= (1 + M + M' + C)^2 + J, \\ M &= -nx + (n-1)y, \qquad M' = -\frac{xy}{1+x}, \qquad C = \frac{2y^2}{(1+x)(1-2y)}, \\ J &= x - \frac{y^2}{(1+x)^2(1-2y)^2} - \frac{x^2}{1+x} . \end{align*} \end{theorem} In the proof the determinant is expanded by the Leibniz formula; with the common arcs of $\sigma$ and $\tau$ this gives disjoint cycles and paths on $V$, and each term of $\mathcal D$ is the contribution of one kind of these components. \begin{proof} By Lemma~\ref{lem:5.1}, $S_n = S_n^{(2)}$ is the sum over arc-disjoint pairs $(\sigma, \tau)$ of the terms \[ (-1)^{c(\sigma)+c(\tau)} \prod_v \lambda(d_v) \det(nI - L_F), \qquad F = \sigma \cup \tau . \] \emph{Step 1: the Leibniz expansion.} For arc-disjoint $\sigma, \tau$, the matrix $nI - L_F$ has the diagonal entries $n - d_v$ and the off-diagonal entries $[\sigma(v) = w] + [\tau(v) = w]$. By the Leibniz formula, $\det(nI - L_F) = \sum_\pi \sgn\pi \prod_v (nI - L_F)_{v, \pi(v)}$, the sum over all permutations $\pi$ of $V$. For a vertex moved by $\pi$, expand the factor $[\sigma(v) = \pi(v)] + [\tau(v) = \pi(v)]$ by choosing whether the arc $(v, \pi(v))$ is used by $\sigma$ or by $\tau$; let $B \subseteq S_\pi$ be the set of vertices whose $\pi$-arc is used by $\sigma$. Put $s_v = [v \in S_\sigma]$ and $t_v = [v \in S_\tau]$, so $d_v = s_v + t_v$, and \[ h_v(s, t) = \lambda(s + t)\,(n - s - t) \quad\text{if } \pi(v) = v, \qquad h_v(s, t) = \lambda(s + t) \quad\text{if } \pi(v) \ne v . \] \emph{Step 2: disjointness.} Write $\pi|_X$ for the set of arcs $(v, \pi(v))$, $v \in X$. For all pairs $(\sigma, \tau)$ define \[ T(\sigma, \tau) = (-1)^{c(\sigma)+c(\tau)} \sum_{\pi, B} \sgn\pi \prod_v h_v(s_v, t_v), \] the sum over the pairs $(\pi, B)$ with $\pi|_B \subseteq \sigma$ and $\pi|_{S_\pi \setminus B} \subseteq \tau$; for arc-disjoint pairs $T(\sigma, \tau)$ is the term of $S_n$. Multiply it by $\sum_E (-1)^{|E|}$ over the sets $E$ of arcs common to $\sigma$ and $\tau$; this factor is $1$ if the pair is arc-disjoint and $0$ otherwise. Exchanging the order of summation, \[ S_n = \sum_{E, \pi, B} (-1)^{|E|} \sgn\pi \sum_{\sigma \supseteq P_\sigma,\ \tau \supseteq P_\tau} (-1)^{c(\sigma)+c(\tau)} \prod_v h_v(s_v, t_v), \] where $P_\sigma = E \cup \pi|_B$ and $P_\tau = E \cup \pi|_{S_\pi \setminus B}$. \emph{Step 3: the common arcs.} If an arc of $E$ has an end in $S_\pi$ and is not an arc of $\pi$, then $P_\sigma$ or $P_\tau$ has two arcs leaving or entering the same vertex, and the inner sum is empty by Lemma~\ref{lem:5.4}. Hence $E = \pi|_D \cup E_0$, where $D \subseteq S_\pi$ and $E_0$ is a set of arcs between fixed points of $\pi$, and $E$ determines $(D, E_0)$; for the inner sum not to vanish, $E_0$ consists of vertex-disjoint paths and cycles, and then so do $P_\sigma$ and $P_\tau$, since the arcs of $\pi$ form disjoint cycles on $S_\pi$. For $v \in D$ the arc $(v, \pi(v))$ lies in $P_\sigma$ and in $P_\tau$ whether or not $v \in B$, so the two choices give the same term: a factor $2$ for each $v \in D$. \emph{Local weights.} By \eqref{eq:5.1}, the inner sum is $(-1)^{c(P_\sigma) + q_\sigma + c(P_\tau) + q_\tau}$ times a sum over marks of $\prod_v \psi_v$. Call the \emph{status} of a vertex in a layer $\mathsf A$ (in $V(P)$), $\mathsf N$ (outside $V(P)$, unmarked) or $\mathsf K$ (marked). The vertex factors $h_v$ take the values $h_v(0,0) = n$, $h_v(1,0) = h_v(0,1) = a(n-1)$, $h_v(1,1) = \alpha$ if $\pi(v) = v$, and $1$, $a$, $\beta$ if $\pi(v) \ne v$. A vertex moved by $\pi$ lies in $V(P_\sigma)$ or in $V(P_\tau)$, since its $\pi$-arc lies in one of them, and a vertex fixed by $\pi$ lies in both or in neither. With $\alpha = a + \beta$ one gets the local factors \begin{center} \begin{tabular}{lll} \hline vertex & statuses in the two layers & $\psi_v$ \\ \hline fixed by $\pi$ & $(\mathsf N, \mathsf N)$ & $n + 2a(n-1) + \alpha$ \\ fixed by $\pi$ & $(\mathsf K, \mathsf N)$ or $(\mathsf N, \mathsf K)$ & $-\bigl(a(n-1) + \alpha\bigr)$ \\ fixed by $\pi$ & $(\mathsf K, \mathsf K)$ or $(\mathsf A, \mathsf A)$ & $\alpha$ \\ moved by $\pi$ & $(\mathsf A, \mathsf A)$ & $\beta$ \\ moved by $\pi$ & $(\mathsf A, \mathsf N)$ or $(\mathsf N, \mathsf A)$ & $\alpha$ \\ moved by $\pi$ & $(\mathsf A, \mathsf K)$ or $(\mathsf K, \mathsf A)$ & $-\beta$ \\ \hline \end{tabular} \end{center} Altogether, \begin{equation}\label{eq:5.2} S_n = \sum_{\pi, B, D, E_0} \sgn\pi\, (-2)^{|D|} (-1)^{|E_0|} (-1)^{c(P_\sigma) + q_\sigma + c(P_\tau) + q_\tau} \sum_{\mu_\sigma, \mu_\tau} \prod_v \psi_v , \end{equation} where $B$ now runs over the subsets of $S_\pi \setminus D$. \emph{The exponential formula.} The cycles of $\pi$ and the components of $E_0$ (paths, cycles and isolated vertices fixed by $\pi$) partition $V$, and the summand of \eqref{eq:5.2} is a product over these components, except for the condition that each layer carries in total at most one path start or mark. Introduce variables $\varepsilon$ and $\varepsilon'$ with $\varepsilon^2 = \varepsilon'^2 = 0$, and give each path start and each mark of the layer of $\sigma$ the factor $\varepsilon$, and those of $\tau$ the factor $\varepsilon'$. Then \eqref{eq:5.2} is the sum of the coefficients of $1$, $\varepsilon$, $\varepsilon'$, $\varepsilon\varepsilon'$ in the unrestricted sum. A configuration $(\pi, B, D, E_0, \mu_\sigma, \mu_\tau)$ is the same as a set partition of $V$ together with one connected structure on each block, and its weight is the product of the weights of the structures. Giving each vertex the factor $z$, the exponential formula for labelled structures, which holds for weights in any commutative $\Q$-algebra, shows that $S_n/n!$ is the coefficient of $z^n$ in \[ \exp\bigl(F + (\varepsilon + \varepsilon')\Gamma + \varepsilon\varepsilon' J\bigr) = e^F \bigl(1 + (\varepsilon + \varepsilon')\Gamma + \varepsilon\varepsilon'(\Gamma^2 + J)\bigr), \] where $F$, $\varepsilon\Gamma$ and $\varepsilon\varepsilon' J$ are the exponential generating functions of the components without path start and mark, with the path start or the mark of the layer of $\sigma$ only, and with both (by the symmetry between $\sigma$ and $\tau$, the components of the layer of $\tau$ give $\varepsilon'\Gamma$). The sum of the four coefficients is $e^F\bigl((1 + \Gamma)^2 + J\bigr)$. Section~\ref{sec:5.4} lists the components and shows that $e^F = e^{n(n-1)z/(n-3)}(1-2y)/(1+x)^3$, $\Gamma = M + M' + C$ and that $J$ is as stated. \end{proof} I checked the theorem independently: it gives the values \[ g_4(-2) = 24, \quad g_5(-2) = 23976, \quad g_6(-2) = 1185546240, \quad g_7(-2) = 4575483936000000, \] which agree with the polynomials $g_n$ computed by a transfer-matrix method for $n \le 10$ and with a direct evaluation of the sum in Lemma~\ref{lem:5.1} over all pairs $(\sigma, \tau)$ for $n \le 12$ (Section~\ref{sec:comp}). The direct evaluation does not use Lemma~\ref{lem:5.4} or the classification. \subsection{The components in the proof of Theorem~\ref{thm:5.5}}\label{sec:5.4} This subsection completes the proof of Theorem~\ref{thm:5.5}. Each vertex carries the factor $z$, so a vertex with local factor $\alpha$ or $\beta$ contributes $x$ or $y$. On a cycle of $\pi$ of length $l$, write the letter $\sigma$ at a vertex $v \in B$, the letter $\tau$ at $v \in S_\pi \setminus (B \cup D)$ and the letter $\mathsf b$ at $v \in D$; reading the letters along the cycle gives a cyclic word. The arcs of $P_\sigma$ on the cycle are those at the letters $\sigma$ and $\mathsf b$, and those of $P_\tau$ are at $\tau$ and $\mathsf b$. Hence the cycle is a cycle of $P_\sigma$ if it has no letter $\tau$, and otherwise each maximal block of letters $\sigma$ and $\mathsf b$ is a path of $P_\sigma$; similarly for $\tau$. A vertex of the cycle lies in $V(P_\sigma)$ if its own letter or the letter of its predecessor is $\sigma$ or $\mathsf b$. The signs are $(-1)^{l-1}$ from $\sgn\pi$, $-2$ for each letter $\mathsf b$, $-1$ for each cycle of $P_\sigma$ or $P_\tau$, $-1$ for each path and $-1$ for each arc of $E_0$. A connected structure on $l$ labelled vertices contributes its weight divided by $l!$ to the exponential generating function. A cycle of length $l$ has $(l-1)!$ cyclic orders of its vertices; a cyclic word without rotational symmetry can be placed in $l$ ways, so it has $l!$ labelled versions, and a word with all letters equal has $(l-1)!$. A non-constant word with a rotational symmetry repeats each of its blocks, so it carries two paths of one layer and contributes $0$; the surviving non-constant words below have no rotational symmetry. A path of $E_0$ on $k+1$ vertices has $(k+1)!$ labelled versions. \paragraph{Components without path start and mark.} A cycle of $\pi$ that contains both letters $\sigma$ and $\tau$ carries a path of each layer, and a cycle with letters $\sigma$ and $\mathsf b$ only, both present, carries a path of $\tau$. The components without path start and mark are: \begin{itemize} \item a vertex fixed by $\pi$ outside $E_0$, statuses $(\mathsf N, \mathsf N)$: $(n + 2a(n-1) + \alpha)z$; \item a cycle of $\pi$ with all letters $\sigma$ (or all $\tau$): a cycle of $P_\sigma$, statuses $(\mathsf A, \mathsf N)$, weight $(-1)^{l-1}(-1)\alpha^l$, so $\sum_{l \ge 2} (-x)^l/l$ each; \item a cycle of $\pi$ with all letters $\mathsf b$: a cycle of both layers, statuses $(\mathsf A, \mathsf A)$, weight $(-1)^{l-1} (-2)^l \beta^l$, so $-\sum_{l \ge 2} (2y)^l/l$; \item a cycle of $E_0$ of length $l \ge 2$: statuses $(\mathsf A, \mathsf A)$ at fixed points, weight $(-1)^l \alpha^l$, so $\sum_{l \ge 2} (-x)^l/l$. \end{itemize} Hence \[ e^F = \exp\Bigl((n + 2a(n-1) + \alpha) z + 3\sum_{l \ge 2} \frac{(-x)^l}{l} - \sum_{l \ge 2} \frac{(2y)^l}{l}\Bigr) = e^{(n + 2a(n-1) + 4\alpha + 2\beta) z}\, \frac{1-2y}{(1+x)^3} \] and $n + 2a(n-1) + 4\alpha + 2\beta = n(n-1)/(n-3)$. \paragraph{Components with the path start or the mark of one layer.} Take the layer of $\sigma$. A mark of $\sigma$ sits on a vertex outside $V(P_\sigma)$, that is, on a vertex fixed by $\pi$ outside $E_0$, or on a cycle of $\pi$ with all letters $\tau$: a mark is only allowed when the layer has no path, and a cycle with a letter $\sigma$ or $\mathsf b$ either lies in $V(P_\sigma)$ or carries a path of $\sigma$. A path of $\sigma$ alone lies on a cycle of $\pi$ with letters $\tau$ and $\mathsf b$ only. This gives three kinds: \begin{itemize} \item a marked fixed vertex, statuses $(\mathsf K, \mathsf N)$: $-(a(n-1) + \alpha) z = -nx + (n-1)y = M$; \item a cycle $\tau^l$ with one marked vertex: the mark replaces one factor $\alpha$ by $-\beta$, with $l$ choices of the vertex; the signs are $(-1)^{l-1}$, $-1$ for the cycle of $P_\tau$ and $-1$ from $-\beta$, so $\sum_{l \ge 2} (-1)^{l-1} \alpha^{l-1}\beta z^l = \sum_{l \ge 2} y(-x)^{l-1} = M'$; \item a cycle $\tau^c \mathsf b^i$ ($i, c \ge 1$): a cycle of $P_\tau$ whose $\mathsf b$-block is the path of $\sigma$. The $i + 1$ vertices of this path lie in both $V(P)$, the other $c - 1$ vertices only in $V(P_\tau)$. The signs are $(-1)^{i+c-1}$, $(-2)^i$, $-1$ for the cycle and $-1$ for the path, so the contribution is $\sum_{i, c \ge 1} (-1)^{c-1} 2^i \beta^{i+1} \alpha^{c-1} z^{i+c} = \sum_{i, c \ge 1} y(2y)^i(-x)^{c-1} = C$. \end{itemize} \begin{figure}[ht] \centering \input{figures/cycleword} \caption{A cycle of $\pi$ with the word $\sigma^2 \mathsf b\, \tau^3 \mathsf b^2$ ($a = 2$, $i = 1$, $c = 3$, $j = 2$), read clockwise; each arc carries the letter of its tail. The arcs with letters $\sigma$ and $\mathsf b$ form the path of $\sigma$, those with letters $\tau$ and $\mathsf b$ the path of $\tau$. The $i + j + 2 = 5$ filled vertices lie on both paths, the other $a + c - 2 = 3$ on one.} \label{fig:cycleword} \end{figure} \paragraph{Components with both layers.} A component carries a path start or mark of each layer in three ways: \begin{itemize} \item a fixed vertex outside $E_0$ with both marks, statuses $(\mathsf K, \mathsf K)$: $\alpha z = x$; \item a cycle of $\pi$ with both letters $\sigma$ and $\tau$. Its maximal blocks of letters $\sigma$ and $\mathsf b$ are paths of $\sigma$, and there is only one; so all letters $\sigma$ lie in one such block, and so do all letters $\tau$ in one block of letters $\tau$ and $\mathsf b$. A block of letters $\mathsf b$ between two letters $\sigma$ would be a second path of $\tau$, and symmetrically, so the letters $\sigma$, and the letters $\tau$, are contiguous. Hence the word is $\sigma^a \mathsf b^i \tau^c \mathsf b^j$ with $a, c \ge 1$, $i, j \ge 0$ (Figure~\ref{fig:cycleword}). The paths are the blocks $\mathsf b^j \sigma^a \mathsf b^i$ and $\mathsf b^i \tau^c \mathsf b^j$, so $i + j + 2$ vertices lie in both $V(P)$ and $a + c - 2$ in one. The signs are $(-1)^{a+i+c+j-1}$, $(-2)^{i+j}$ and $(-1)^2$ for the two paths, so the contribution is $\sum (-1)^{a+c-1} 2^{i+j} \beta^{i+j+2} \alpha^{a+c-2} z^{a+i+c+j} = -y^2/\bigl((1+x)^2(1-2y)^2\bigr)$; \item a path of $E_0$ with $k \ge 1$ arcs: a path of both layers on $k+1$ fixed points of $\pi$, statuses $(\mathsf A, \mathsf A)$, signs $(-1)^k$ and $(-1)^2$, so $\sum_{k \ge 1} x(-x)^k = -x^2/(1+x)$. \end{itemize} The sum is $J$. A component cannot carry two path starts or marks of the same layer, and the components above exhaust the cycles of $\pi$ (by their words), the components of $E_0$ (isolated vertices, cycles, paths) and the possible positions of marks. This completes the proof of Theorem~\ref{thm:5.5}.