\section{Full layers and the orders \texorpdfstring{$94$}{94} and \texorpdfstring{$118$}{118}}\label{sec:7} For $n = p + m$ with $m \ge 3$, Proposition~\ref{prop:4.1} moves the second $p$-adic digit to the ladder value $g_n(-k)$ with $k = m - 1$, and Lemma~\ref{lem:5.1} writes it as a sum over $k$ partial derangements. Section~\ref{sec:5} evaluated this sum for $k \le 2$ by a classification of configurations, which becomes unmanageable for larger $k$. This section shows that modulo $p^2$ the sum has a much simpler structure: only tuples of derangements that move every vertex contribute, and their sum is a signed count of Latin rectangles. For even $k$ this count is a pairing of two powers in an algebra with commuting and anticommuting variables (Theorem~\ref{thm:7.4}). For $k = 4$, that is $n = p + 5$, I evaluated the pairing by computer, and this settles the orders $94 = 89 + 5$ and $118 = 113 + 5$. \subsection{Reduction to full layers} For $k \ge 0$, $N \ge 0$ and an integer $a$ let \[ A_k(N, a) = \sum_{(\sigma_1, \dots, \sigma_k)} \prod_{i=1}^k (-1)^{c(\sigma_i)} \det\bigl(aI + P_{\sigma_1} + \dots + P_{\sigma_k}\bigr), \] where the sum runs over the $k$-tuples of pairwise arc-disjoint derangements of $[N]$ (each $\sigma_i$ moves every vertex) and $P_\sigma$ is the permutation matrix of $\sigma$; $A_k(0,a) = 1$ and $A_0(N,a) = a^N$. The determinants are polynomials in $a$ with integer coefficients, so $A_k(N,a) \in \Z[a]$. \begin{lemma}\label{lem:7.1} Let $p$ be a prime, $1 \le m < p$, $n = p + m$ and $k = m - 1$. Then \[ g_n(-k) \equiv \frac{(-1)^k\,((p-1)!)^{n-1}}{n^2\, k!}\, A_k(n, p+1) \pmod{p^2} . \] \end{lemma} \begin{proof} By the proof of Lemma~\ref{lem:5.1}, with $n - 2 - k = p - 1$, \[ g_n(-k) = \frac{(-1)^k}{k!\,(p-1)!} \sum_{(\sigma_1, \dots, \sigma_k)} w(\sigma_1, \dots, \sigma_k), \qquad w = \prod_i (-1)^{c(\sigma_i)}\, t(K_n^* - F) \prod_{v} (n-2-d_v)! , \] where $t(K_n^* - F) = \det(nI - L_F)/n^2$ is an integer by Lemma~\ref{lem:5.2}. Call a vertex \emph{full} if $d_v = k$. For a full vertex, $(n-2-d_v)! = (p-1)!$ is prime to $p$. For $d_v < k$ one has $p \le n - 2 - d_v \le p + k - 1 < 2p$, so $(n-2-d_v)!$ is divisible by $p$. Hence tuples with two or more vertices that are not full contribute $0$ modulo $p^2$. Fix a vertex $u$ and let $T_u$ be the set of tuples in which $u$ is the only vertex that is not full. The weight $w$ is invariant under relabelling the vertices, and a relabelling that fixes $u$ maps $T_u$ to itself, and $w/p$ is an integer on $T_u$. Let $Z$ be a set of $p$ vertices not containing $u$ (possible since $n - 1 \ge p$), $\rho$ a cyclic permutation of $Z$ fixing $W = [n] \setminus Z$ pointwise, and let $\rho$ act on $T_u$ by conjugation. Orbits have length $1$ or $p$, so $\sum_{T_u} w/p$ is congruent modulo $p$ to the sum over the fixed tuples. Suppose $\rho\sigma_i\rho^{-1} = \sigma_i$ for all $i$. For $v \in W$, $\sigma_i(v) = \sigma_i(\rho v) = \rho\,\sigma_i(v)$, so $\sigma_i$ maps $W \cap S_{\sigma_i}$ into $W$. Now $|W| = n - p = k + 1$. Every $v \in W \setminus \{u\}$ is full, so $\sigma_1(v), \dots, \sigma_k(v)$ are $k$ distinct elements of $W \setminus \{v\}$, which has $k$ elements; hence $\sigma_i(v) = u$ for exactly one $i$. Since each $\sigma_i$ is injective, the $k$ vertices of $W \setminus \{u\}$ use $k$ different indices $i$. Hence $u$ is in the image of every $\sigma_i$, at some $v \ne u$, so every $\sigma_i$ moves $u$ and $d_u = k$, a contradiction. There are no fixed tuples, and the tuples in $T_u$ contribute $0$ modulo $p^2$. It remains to sum over the tuples in which all vertices are full, that is, over $k$-tuples of pairwise arc-disjoint derangements of $[n]$. For these $D_F = kI$, so $nI - L_F = (n-k)I + A_F = (p+1)I + A_F$ with $A_F = P_{\sigma_1} + \dots + P_{\sigma_k}$, and $\prod_v (n-2-d_v)! = ((p-1)!)^n$. This gives the formula. \end{proof} For full derangements $(-1)^{c(\sigma)} = (-1)^N \sgn\sigma$, so for even $k$ the sign in $A_k(N,a)$ is $\prod_i \sgn\sigma_i$. In this case the sum has a symmetric form. For $N \ge 0$ and $k \ge 0$ let $S_k(N)$ be the sum of $\prod_{i=0}^{k+1} \sgn\pi_i$ over the tuples $(\pi_0, \pi_1, \dots, \pi_{k+1})$ of permutations of $[N]$ such that for every $v \in [N]$ the values $\pi_1(v), \dots, \pi_{k+1}(v)$ are distinct and $\pi_0(v)$ is one of them. In other words, $(\pi_1, \dots, \pi_{k+1})$ are the rows of a $(k+1) \times N$ Latin rectangle (written columnwise), and $\pi_0$ is a permutation contained in its support. Figure~\ref{fig:rectangle} shows an example with $k = 2$ and $N = 4$. \begin{figure}[H] \centering \input{figures/rectangle} \caption{A Latin rectangle with rows $\pi_1, \pi_2, \pi_3$ and $N = 4$ columns, and a permutation $\pi_0$ with $\pi_0(v) \in \{\pi_1(v), \pi_2(v), \pi_3(v)\}$ for every $v$ (highlighted cells); the tuple $(\pi_0, \dots, \pi_3)$ is one of the tuples counted by $S_2(4)$.} \label{fig:rectangle} \end{figure} \begin{lemma}\label{lem:7.2} Let $k$ be even and $N \ge 0$. \begin{enumerate} \item $N!\,A_k(N,1) = S_k(N)$. \item $\frac{\partial}{\partial a} A_k(N,a)\big|_{a=1} = \frac{N}{k+1}\, A_k(N,1)$. \item $A_k(k+2, 1) = -(k+1)\, D_{k+2}/(k+2)!$. \end{enumerate} \end{lemma} \begin{proof} (1) The matrix $I + P_{\sigma_1} + \dots + P_{\sigma_k}$ is a $(0,1)$-matrix, so its determinant is the sum of $\sgn\pi_0$ over the permutations $\pi_0$ with $\pi_0(v) \in \{v, \sigma_1(v), \dots, \sigma_k(v)\}$ for all $v$. With $\pi_1 = \mathrm{id}$ and $\pi_{i+1} = \sigma_i$ the summands of $A_k(N,1)$ are exactly the summands of $S_k(N)$ with $\pi_1 = \mathrm{id}$, since the values $v, \sigma_1(v), \dots, \sigma_k(v)$ are distinct for all $v$ exactly when the $\sigma_i$ are pairwise arc-disjoint derangements. For an arbitrary tuple in $S_k(N)$, replacing every $\pi_i$ by $\pi_i\pi_1^{-1}$ gives a tuple with $\pi_1 = \mathrm{id}$ (the condition at $v$ becomes the condition at $\pi_1(v)$) and multiplies the sign by $(\sgn\pi_1)^{k+2} = 1$. This is a bijection between the tuples with a given $\pi_1$ and those with $\pi_1 = \mathrm{id}$, for each of the $N!$ permutations $\pi_1$. (2) Here $M = P_{\sigma_1} + \dots + P_{\sigma_k}$ has zero diagonal. Differentiating \[ \det(aI + M) = \sum_{\pi} \sgn\pi \prod_v \bigl(a[\pi(v) = v] + M_{v,\pi(v)}\bigr) \] at $a = 1$ gives the sum of $\sgn\pi_0$ times the number of fixed points of $\pi_0$. Under the bijection of (1), the fixed points of $\pi_0\pi_1^{-1}$ correspond to the vertices $v$ with $\pi_0(v) = \pi_1(v)$. Hence $N!\,\partial_a A_k(N,1)$ is the signed sum of $N_1$ over the tuples of $S_k(N)$, where $N_i$ is the number of $v$ with $\pi_0(v) = \pi_i(v)$. Exchanging $\pi_1$ and $\pi_i$ is a sign-preserving bijection on these tuples, so the signed sums of $N_1, \dots, N_{k+1}$ agree, and $N_1 + \dots + N_{k+1} = N$ for every tuple. (3) For $N = k+2$, for every $v$ one of the $N$ values is missing among $\pi_1(v), \dots, \pi_{k+1}(v)$; call it $\pi_{k+2}(v)$. Every value is taken exactly once by each of $\pi_1, \dots, \pi_{k+1}$, hence missed for exactly one $v$, so $\pi_{k+2}$ is a permutation and $(\pi_1, \dots, \pi_{k+2})$ is a Latin square of order $k+2$ in the sense of Section~\ref{sec:2}. The sum over $\pi_0$ is $\det(J - P_{\pi_{k+2}}) = \det(J - I)\sgn\pi_{k+2} = -(k+1)\sgn\pi_{k+2}$. Hence $S_k(k+2) = -(k+1) D_{k+2}$, and (1) gives the claim. \end{proof} \begin{corollary}\label{cor:7.3} Let $p$ be a prime, $m$ odd with $3 \le m < p$, $n = p + m$, and $A = A_{m-1}(n, 1)$. Then $p \mid A$ and \[ \frac{U_n}{p} \equiv \frac{1}{m^2 (m-1)!}\,\frac{A}{p}, \qquad \frac{D_n}{p^3} \equiv \frac{(m-1)!}{m}\,\frac{A}{p} \pmod p . \] In particular, if $A \not\equiv 0 \pmod{p^2}$, then $D_n$ is divisible by exactly $p^3$ and the Alon--Tarsi conjecture holds for $n$. \end{corollary} \begin{proof} Let $k = m - 1$, which is even. Since $A_k(n,a) \in \Z[a]$, Lemma~\ref{lem:7.2}(2) gives $A_k(n, p+1) \equiv A\,(1 + pn/m) \pmod{p^2}$, and $n/m$ is $p$-integral. By Corollary~\ref{cor:3.2}, $g_n(-k) \equiv 0 \pmod p$, so Lemma~\ref{lem:7.1} gives $p \mid A$ and then $A_k(n,p+1) \equiv A \pmod{p^2}$. Modulo $p$ the factor in Lemma~\ref{lem:7.1} is $-1/(m^2 (m-1)!)$, by Wilson's theorem and since $n - 1$ is odd. With $U_n = -g_n(1-n) \equiv -g_n(-k) \pmod{p^2}$ (Lemma~\ref{lem:2.4} and Proposition~\ref{prop:4.1}) this gives the first congruence. Finally $n!/p \equiv -m!$ and $(n-1)!/p \equiv -(m-1)!$ modulo $p$, and $D_n = n!\,(n-1)!\,U_n$. \end{proof} For $m = 3$, the corollary and Theorem~\ref{thm:1.1} give $A_2(p+3,1)/p \equiv -108\,(4K_6(p) - 5) \pmod p$, a congruence for a signed count of Latin rectangles with three rows. \subsection{A pairing formula}\label{sec:7.2} Let $k \ge 0$, $q = k + 2$, and let $\mathcal I = \{0, 1, \dots, k+1\}$ be the set of indices of the permutations $\pi_0, \dots, \pi_{k+1}$ in $S_k(N)$. For every nonempty $B \subseteq \mathcal I$ take a variable $z_B$: if $|B|$ is even, $z_B = y_B$ is an ordinary (commuting) variable; if $|B|$ is odd, $z_B = \theta_B$ is a Grassmann variable, so that $\theta_B\theta_C = -\theta_C\theta_B$ and $\theta_B^2 = 0$, and the $y_B$ commute with everything. Fix a total order of the nonempty subsets of $\mathcal I$. For a set partition $\tau$ of $\mathcal I$ let $z^\tau$ be the product of the variables of its blocks in this order, let $\varepsilon(\tau)$ be the sign of the permutation of $\mathcal I$ obtained by writing the blocks of $\tau$ in this order, each block in increasing order, and let $\mu(\tau) = \prod_{B \in \tau} (-1)^{|B|-1} (|B|-1)!$ be the M\"obius function of the partition lattice (see \cite[p.~80]{GesselBAMS} for this product formula) from the partition into singletons to $\tau$. Put \[ P = -\sum_{\tau:\ \{0\} \notin \tau} \mu(\tau)\, \varepsilon(\tau)\, z^\tau, \qquad Q = \sum_{\tau} \varepsilon(\tau)\, z^\tau , \] the first sum over the partitions in which $0$ is not a singleton. If $q$ is even, every partition of $\mathcal I$ has an even number of odd blocks, so all monomials of $P$ and $Q$ commute with each other; for odd $q$ this fails, and $P^N$, $Q^N$ are the powers in the (noncommutative) algebra. In the application in Section~\ref{sec:7.3}, $k = 4$ and $q = 6$ is even. The algebra is the tensor product of $\Z[y_B]$ with the exterior algebra over $\Z$ on the $\theta_B$, so the normal monomials below form a $\Z$-basis. Every product of variables is $0$ or $\pm$ a \emph{normal monomial} $y^\alpha\theta_{\mathcal J}$, where $\mathcal J$ is a set of odd blocks and $\theta_{\mathcal J}$ is the product of its variables in increasing order. Define a bilinear pairing by \[ \langle y^\alpha\theta_{\mathcal J},\, y^\beta\theta_{\mathcal J'} \rangle = [\alpha = \beta]\,[\mathcal J = \mathcal J']\, \prod_B \alpha_B! . \] On the commuting variables this is the Fischer inner product $\langle f, g \rangle = f(\partial)\, g\,|_{y=0}$. \begin{theorem}\label{thm:7.4} For every $k \ge 0$ and $N \ge 0$, $S_k(N) = \langle P^N, Q^N \rangle$. For even $k$, hence, $A_k(N,1) = \langle P^N, Q^N\rangle / N!$. \end{theorem} \begin{proof} \emph{Step 1: rows.} For a tuple $\pi = (\pi_0, \dots, \pi_{k+1})$ and a vertex $v$, let $\tau_v(\pi)$ be the partition of $\mathcal I$ into the classes of equal values $\pi_i(v)$. The condition on row $v$ in $S_k(N)$ is $f(\tau_v(\pi)) = 1$, where $f(\tau) = 1$ if the indices $1, \dots, k+1$ lie in different blocks of $\tau$ and $0$ is not a singleton, and $f(\tau) = 0$ otherwise. Write $\tau' \le \tau$ if $\tau'$ refines $\tau$, and $\hat 0$ for the partition into singletons. If $1, \dots, k+1$ lie in different blocks, then either $0$ shares its block with exactly one of them or $\tau = \hat 0$; so $f = h - \delta$ with $h(\tau) = [1, \dots, k+1 \text{ in different blocks}]$ and $\delta(\tau) = [\tau = \hat 0]$. I claim that $f(\tau) = \sum_{\tau' \le \tau} g(\tau')$ with \[ g(\tau') = -\mu(\tau')\, [\{0\} \notin \tau'] . \] Indeed $\sum_{\tau' \le \tau} \mu(\tau') = \delta(\tau)$ by the definition of the M\"obius function, and the partitions $\tau' \le \tau$ in which $\{0\}$ is a singleton correspond to the partitions of $\{1, \dots, k+1\}$ refining the restriction of $\tau$, with the same value of $\mu$, so their sum is $h(\tau)$. Inserting this, \[ S_k(N) = \sum_{(\tau'_v)_{v \in [N]}} \prod_v g(\tau'_v) \sum_{\pi} \prod_i \sgn\pi_i , \] where the inner sum runs over the tuples with $\pi_i(v) = \pi_j(v)$ whenever $i$ and $j$ lie in a common block of $\tau'_v$, for all $v$. \emph{Step 2: tokens.} Fix $(\tau'_v)$. Call a pair $(v, B)$ with $B \in \tau'_v$ a \emph{token} sent by $v$. A tuple $\pi$ in the inner sum assigns to each token a column $c(v,B)$ (the common value $\pi_i(v)$, $i \in B$), and the condition that every $\pi_i$ is a permutation says that the tokens received by each column $c$ form a partition $\sigma_c$ of $\mathcal I$. Grouping by $(\sigma_c)_{c \in [N]}$, the tuple is given by a bijection $\beta_B$, for every block $B$, from the $e_B$ tokens of type $B$ sent by the rows to the $e_B$ tokens of type $B$ received by the columns (the numbers must agree). Conversely, partitions $(\sigma_c)$ with the same numbers $e_B$ and bijections $(\beta_B)$ determine a unique tuple $\pi$ compatible with $(\tau'_v)$. Hence \[ S_k(N) = \sum_{(\tau'_v),\,(\sigma_c)} \prod_v g(\tau'_v) \sum_{(\beta_B)} \prod_i \sgn\pi_i . \] \emph{Step 3: the sign.} Let $X = [N] \times \mathcal I$ and $\Theta(v,i) = (\pi_i(v), i)$. Then $\Theta$ is a permutation of $X$ acting on $[N] \times \{i\}$ as $\pi_i$, so $\sgn\Theta = \prod_i \sgn\pi_i$. To compute it, order the source $X$ by rows, and within row $v$ by the tokens of $v$ in the order of their blocks, each token by increasing $i$; this differs from the lexicographic order of $X$ by the permutation with sign $\prod_v \varepsilon(\tau'_v)$. Order the target $X$ in the same way by columns and received tokens; this costs $\prod_c \varepsilon(\sigma_c)$. With respect to these two orders, $\Theta$ maps each token, as a consecutive segment, onto its image token, preserving the order inside the segment. A permutation that moves consecutive segments of lengths $b_1, b_2, \dots$ as wholes has sign $\prod (-1)^{b_j b_l}$ over the pairs of segments whose order is reversed, and only pairs of odd tokens contribute. Hence \[ \prod_i \sgn\pi_i = \prod_v \varepsilon(\tau'_v) \prod_c \varepsilon(\sigma_c)\; \kappa , \] where $\kappa$ is the sign of the permutation that takes the odd tokens from their order on the row side to their order on the column side. \emph{Step 4: the bijections.} Changing $\beta_B$ by a transposition swaps the values of two rows in each $\pi_i$, $i \in B$, and multiplies $\prod_i \sgn\pi_i$ by $(-1)^{|B|}$. For even $|B|$ all $e_B!$ bijections therefore give the same sign. For odd $|B|$ and $e_B \ge 2$, the bijections come in pairs of opposite sign and cancel. Only terms with $e_B \le 1$ for all odd $B$ remain, and each of them is counted $\prod_{|B| \text{ even}} e_B!$ times with the sign of Step 3. \emph{Step 5: the pairing.} Expanding $P^N$ as an ordered product of $N$ factors, one for each row, gives $\sum_{(\tau'_v)} \prod_v g(\tau'_v)\varepsilon(\tau'_v) \cdot z^{\tau'_1} \cdots z^{\tau'_N}$, and the product of the variables is $0$ if an odd variable repeats and otherwise $\kappa_R\, y^\alpha\theta_{\mathcal J}$, where $\alpha_B = e_B$ and $\kappa_R$ is the sign that sorts the odd variables from their row order. The same holds for $Q^N$ with the columns, weights $\varepsilon(\sigma_c)$ and a sign $\kappa_C$. The pairing of the two normal monomials is $[\text{equal}]\prod_B e_B!$, and $\kappa_R\kappa_C = \kappa$. Comparing with Steps 2 to 4 gives $S_k(N) = \langle P^N, Q^N\rangle$, and Lemma~\ref{lem:7.2}(1) gives the second statement. \end{proof} The smallest case shows the mechanism. For $k = 0$ the condition says $\pi_0 = \pi_1$, so $S_0(N) = N!$. Here $\mathcal I = \{0, 1\}$; write $y = y_{\{0,1\}}$, $\theta_0 = \theta_{\{0\}}$, $\theta_1 = \theta_{\{1\}}$ and order the subsets as $\{0\}, \{1\}, \{0,1\}$. The only partition in which $0$ is not a singleton is $\{\{0,1\}\}$, with $\mu = -1$, so $P = y$ and $Q = y + \theta_0\theta_1$. Since $(\theta_0\theta_1)^2 = 0$, one has $Q^N = y^N + N y^{N-1}\theta_0\theta_1$, and $\langle P^N, Q^N\rangle = \langle y^N, y^N\rangle = N!$. In the language of the proof, every row sends one token of type $\{0,1\}$, so every column must receive one, and the $N!$ bijections between them are the $N!$ choices of $\pi_0 = \pi_1$. The term with $\theta_0\theta_1$ describes columns that receive two separate tokens, which no row sends, and it pairs to zero. Figure~\ref{fig:tokens} shows Steps 1 to 4 for $k = 2$, where the signs matter, and Table~\ref{tab:dict} summarises the translation between the count and the algebra. \begin{table}[ht] \centering \small \begin{tabular}{ll} \hline the count $S_k(N)$ & the pairing $\langle P^N, Q^N\rangle$ \\ \hline row $v$ & one factor $P$ of $P^N$ \\ column $c$ & one factor $Q$ of $Q^N$ \\ a token of type $B$ (indices with equal values) & the variable $z_B$ \\ inclusion and exclusion over the condition on a row & the coefficients $-\mu(\tau)$ in $P$ \\ the $e_B!$ bijections between tokens of type $B$ & the factor $\alpha_B!$ in the pairing \\ two lines of odd type cross, the sign changes & $\theta_B\theta_C = -\theta_C\theta_B$ \\ two tokens of the same odd type cancel (Step~4) & $\theta_B^2 = 0$ \\ \hline \end{tabular} \caption{The translation in the proof of Theorem~\ref{thm:7.4}. Lines join the tokens sent by the rows to the tokens received by the columns, as in Figure~\ref{fig:tokens}.} \label{tab:dict} \end{table} \begin{figure}[H] \centering \input{figures/tokens} \caption{Steps 1 to 4 of the proof of Theorem~\ref{thm:7.4} for $k = 2$, $\mathcal I = \{0, 1, 2, 3\}$ and $N = 3$. Row $v$ sends one token for each block of its partition $\tau'_v$, in which $0$ is not a singleton; column $c$ receives tokens that form a partition $\sigma_c$ of $\mathcal I$, and the lines are the bijections $\beta_B$ between tokens of the same type $B$. (a) The odd type $\{3\}$ occurs twice. (b) Exchanging the two lines of type $\{3\}$ swaps the values of rows $2$ and $3$ in $\pi_3$ and changes the sign of the term, so the two terms cancel (Step 4).} \label{fig:tokens} \end{figure} For unsigned counts of Latin rectangles, Steps 1, 2 and 5 have a precursor: Gessel \cite{GesselBAMS} weights the colour classes of the edges between two vertices by M\"obius functions of partition lattices, cuts the edges into half-edge blocks and pairs blocks of the same type, which gives a formula for the number of $k \times n$ Latin rectangles and shows that it is P-recursive in $n$ for fixed $k$. Expressions of such counts by symmetric functions in several sets of variables go back to MacMahon \cite[Section~10]{Gessel90}; Gessel \cite[Sections~8--11]{Gessel87} develops them. The new features of Theorem~\ref{thm:7.4} are the signs (Steps 3 and 4), which the Grassmann variables carry, and the extra permutation $\pi_0$; for six indices, Theorem~\ref{thm:closed} below gives the corresponding P-recursiveness for the signed count. The theorem turns a signed count of Latin rectangles with an extra permutation into an algebraic expression in a fixed number of variables, $2^{k+2} - 1$, which depends on $k$ but not on $N$; the work needed to evaluate $\langle P^N, Q^N\rangle$ still grows with $N$. Its first consequence is a congruence modulo $p$ of Lucas type. \begin{theorem}\label{thm:7.5} Let $m \ge 1$ be odd, $k = m - 1$, $p$ a prime and $0 \le a < p$. Then \[ A_k(p+a, 1) \equiv m!\, A_k(a, 1) \pmod p . \] In particular $p \mid A_k(p+m, 1)$ if $3 \le m < p$, since then $A_k(m,1) = 0$. \end{theorem} \begin{proof} All coefficients of $P$ and $Q$ are integers, and the monomials of $P$ commute, so in the ring of integral combinations of normal monomials $P^p = \sum_M c_M^p M^p + p\Delta$ with $P = \sum_M c_M M$ and integral $\Delta$. A monomial with an odd variable has $M^p = 0$, and $c_M^p \equiv c_M \pmod p$. The same holds for $Q$. Let $N = p + a$. In a normal monomial $M = y^\alpha\theta_{\mathcal J}$ of $P^N$ every $\alpha_B \le N < 2p$, so $\prod_B \alpha_B!$ is divisible by $p$ exactly $h(M)$ times, where $h(M)$ is the number of $B$ with $\alpha_B \ge p$. In $P^N = P^a P^p$, the part $P^a\sum c_M M^p$ only has monomials with $h \ge 1$. Hence monomials with $h(M) = 0$ have coefficients divisible by $p$ in $P^N$ and in $Q^N$ and contribute $0$ modulo $p^2$ to $\langle P^N, Q^N\rangle$, and monomials with $h(M) \ge 2$ contribute $0$ modulo $p^2$ as well. If $h(M) = 1$, then modulo $p$ the coefficient of $M$ comes from a term $c_{M'}M'^p$, where $M' = z^\tau$ for a partition $\tau$ of $\mathcal I$; since $M'^p$ has exponent at least $p$ at every block of $\tau$, the partition $\tau$ has a single block, so $M' = y_{\mathcal I}$, whose coefficient is $-\mu(\{\mathcal I\}) = (q-1)! = m!$ in $P$ and $1$ in $Q$. Writing $M = y_{\mathcal I}^p M_0$, where $M_0$ is a monomial of $P^a$ with $y_{\mathcal I}$-exponent $b \le a$, the factor $\prod \alpha_B!$ of $M$ is that of $M_0$ times $(p+b)!/b! = (b+1)\cdots(b+p) \equiv -p \pmod{p^2}$ (the factor $p$ occurs once, since $b < p$, and the other $p - 1$ factors run through the nonzero residues modulo $p$, whose product is $-1$ by Wilson's theorem). Altogether $\langle P^N, Q^N\rangle \equiv -p\, m!\, \langle P^a, Q^a\rangle \pmod{p^2}$, and $N! \equiv -p\, a! \pmod{p^2}$. Dividing, Theorem~\ref{thm:7.4} gives the congruence. For $N = m$, the identity and $k$ arc-disjoint derangements fill the all-ones matrix $J$ of order $m$, so every determinant in $A_k(m,1)$ is $\det J = 0$. \end{proof} For unsigned counts, Stones and Wanless \cite{SW10} prove congruences of the same shape for the numbers $R_{k,n}$ of reduced $k \times n$ Latin rectangles, by letting a cyclic group act on blocks of columns; among them $R_{k,n+p} \equiv (-1)^{k-1}(k-1)!\, R_{k,n} \pmod p$ for primes $p \ge k$. Theorem~\ref{thm:7.5} is a signed analogue for the counts $A_k$, which carry the extra permutation $\pi_0$ and the determinant. Together with Lemma~\ref{lem:7.1} and $g_n(1-n) \equiv g_n(1-m) \pmod p$, this gives once more the divisibility $p \mid U_{p+m}$ for odd $m$ with $3 \le m < p$, without Corollary~\ref{cor:3.2}. \subsection{Five layers}\label{sec:7.3} For $k = 4$ there are six indices, and the blocks are the $15$ pairs, the $15$ sets of size $4$ and the whole set $\mathcal I$ (even), and the $6$ singletons, the $20$ sets of size $3$ and the $6$ sets of size $5$ (odd). The partitions of $\mathcal I$ into even blocks have the types $2+2+2$, $4+2$ and $6$, with coefficients $1$, $-6$ and $120$ in $P$ (times $\varepsilon$) and $1$ in $Q$. For the type $2+2+2$, $\sum_\tau \varepsilon(\tau) z^\tau$ is the Pfaffian $\operatorname{pf}(Y)$ of the antisymmetric $6 \times 6$ matrix $Y$ with entries $Y_{ij} = y_{\{i,j\}}$ for $i < j$: the shuffle sign of a perfect matching is the sign of the word $i_1j_1i_2j_2i_3j_3$ with $i_r < j_r$, which does not depend on the order of the pairs, and this is the sign in the usual definition of the Pfaffian. \begin{lemma}\label{lem:7.6} For $k = 4$, as formal power series in $s$ and $t$ with $u = st$, \[ \langle e^{sP}, e^{tQ}\rangle = e^{120u}\, \mathbb E\Bigl[e^{-6u|Y|^2} e^{s\operatorname{pf}(Y) + t\operatorname{pf}(\overline Y)} \prod_i (1 + S_i)\Bigr], \] where $|Y|^2 = \sum_e |Y_e|^2$ over the $15$ pair variables, the expectation acts on the pair variables as the expectation for independent standard complex Gaussians $Y_e$ and on the Grassmann variables by the pairing of Section~\ref{sec:7.2}, and the $S_i$ are finitely many explicit terms that contain Grassmann variables (listed in Appendix~\ref{sec:B}). Moreover, for polynomials $f$, $g$ in the pair variables that are homogeneous of the same degree $D$, \[ \mathbb E\bigl[e^{-c|Y|^2} f(Y)\, g(\overline Y)\bigr] = (1+c)^{-15-D}\,\langle f, g\rangle . \] \end{lemma} \begin{proof} For polynomials in commuting variables, $\langle f, g\rangle = \mathbb E\,[f(Y)\,g(\overline Y)]$ for independent standard complex Gaussians, since $\mathbb E\,Y^a\overline Y^b = [a=b]\,a!$; all identities hold coefficientwise in $s$ and $t$, where they are finite. If a commuting variable $y$ occurs only linearly, as $s\alpha y$ in the exponent on one side and $t\beta y$ on the other, with even $\alpha$, $\beta$ free of $y$, then $\mathbb E\,e^{\lambda Y + \nu\overline Y} = e^{\lambda\nu}$ gives the factor $e^{st\alpha\beta}$. The variable $y_{\mathcal I}$ occurs only in the terms $120\,y_{\mathcal I}$ of $P$ and $y_{\mathcal I}$ of $Q$, which gives $e^{120u}$. A set $B$ of size $4$ occurs only together with its complementary pair $\{i,j\}$, in the types $4+2$ and $4+1+1$; its contraction gives the scalar factor $e^{-6u|y_{ij}|^2}$ times a factor whose exponent contains Grassmann variables. The terms of type $2+2+2$ add up to $\operatorname{pf}(Y)$. All remaining terms of $P$ and $Q$, and the Grassmann parts of the contractions, contain Grassmann variables; they are even and square to zero, so their exponentials are $1 + S_i$. Finally $\mathbb E[e^{-c|Y|^2}Y^a\overline Y^b] = [a=b]\,a!\,(1+c)^{-|a|-15}$ for the $15$ pair variables. \end{proof} For the part without Grassmann variables, Lemma~\ref{lem:7.6} and the antisymmetric Cayley identity $\operatorname{pf}(\partial)\operatorname{pf}(Y)^s = s(s+2)(s+4)\operatorname{pf}(Y)^{s-1}$ \cite[Theorem~2.3]{CSS} already give a closed formula. The Grassmann variables and the pair variables with insertions remain. To evaluate the pairing I first compute the moments of the Pfaffian exactly, using only elementary identities and one classical fact about representations of $\mathrm{GL}_6$. Representation theory enters through a symmetry. The $15$ pair variables are the entries of the antisymmetric matrix $Y$, and $\mathrm{GL}_6$ acts on $Y$ by $Y \mapsto gYg^T$, which multiplies $\operatorname{pf}(Y)$ by $\det g$. Because of this symmetry, the pairing of powers of the Pfaffian with other polynomials need not be computed monomial by monomial: it suffices to know it on one polynomial $f_\lambda$ for each partition $\lambda$ with at most three parts (Proposition~\ref{prop:pfmom}). Section~\ref{sec:7.5} then reduces the resulting series to the Euler series of factorials. Theorem~\ref{thm:crit5} and the orders $94$ and $118$ use only the statement of Theorem~\ref{thm:closed}. \subsection{Pfaffian moments}\label{sec:7.4} Write $\partial_e = \partial/\partial y_e$ for the $15$ pair variables and $\operatorname{pf}(\partial)$ for the Pfaffian of the antisymmetric matrix of these derivatives. Let $\operatorname{pf}_2 = y_{01}$, $\operatorname{pf}_4 = y_{01}y_{23} - y_{02}y_{13} + y_{03}y_{12}$ and $\operatorname{pf}_6 = \operatorname{pf}(Y)$ be the leading principal sub-Pfaffians, and for a partition $\lambda = (\lambda_1 \ge \lambda_2 \ge \lambda_3 \ge 0)$ put \[ f_\lambda = \operatorname{pf}_2^{\lambda_1-\lambda_2} \operatorname{pf}_4^{\lambda_2-\lambda_3} \operatorname{pf}_6^{\lambda_3}, \qquad \kappa_\lambda(K) = \prod_{i=1}^{3} \frac{(\lambda_i + K + s_i)!}{(\lambda_i + s_i)!}, \quad s = (4, 2, 0) . \] Let $V_D$ be the space of homogeneous polynomials of degree $D$ in the pair variables. For $g \in \mathrm{GL}_6(\mathbb C)$ write $c_g(Y) = g Y g^T$. \begin{lemma}\label{lem:pfaux} \begin{enumerate} \item $\langle y_e f, h\rangle = \langle f, \partial_e h\rangle$; hence $\langle \operatorname{pf}\cdot f, h\rangle = \langle f, \operatorname{pf}(\partial) h\rangle$. \item For every polynomial $\varphi$ and $g \in \mathrm{GL}_6$, $\operatorname{pf}(\partial)(\varphi \circ c_g) = \det(g)\,(\operatorname{pf}(\partial)\varphi) \circ c_g$. \item For $K \ge 0$ the operator $\Delta_K = \operatorname{pf}(\partial)^K \circ \operatorname{pf}^K$ maps $V_D$ to $V_D$ and commutes with the action of the Lie algebra $\mathfrak{gl}_6$ by the derivations $X_A\varphi(Y) = \frac{d}{d\epsilon}\varphi((1+\epsilon A)Y(1+\epsilon A)^T)|_{\epsilon=0}$. \end{enumerate} \end{lemma} \begin{proof} (1) On monomials both sides are $[\alpha + e = \beta]\,\beta!$. (2) With $\langle Z, Y\rangle = \sum_{i