\section{Introduction}\label{sec:intro} A \emph{Latin square} of order $n$ is an $n\times n$ array filled with the symbols $1,\dots,n$ so that every symbol occurs exactly once in each row and exactly once in each column. Read from left to right, each row is a permutation of the symbols, and read from top to bottom, so is each column. A Latin square is \emph{even} if the product of the signs of these $2n$ permutations is $+1$, and \emph{odd} if it is $-1$ (Figure~\ref{fig:evenodd}). Let $L^e_n$ and $L^o_n$ be the numbers of even and odd Latin squares of order $n$. For odd $n>1$ these numbers are equal: exchanging the first two rows of a square leaves the set of row permutations unchanged and composes every column permutation with a transposition, so it changes the sign of the square by $(-1)^n=-1$ and pairs the even squares with the odd ones. For even $n$ no such pairing is known, and Alon and Tarsi conjectured that none exists. \medskip \noindent\textbf{The Alon--Tarsi conjecture} (1992 \cite{AT92}). \emph{For every even $n$, $L^e_n\ne L^o_n$.} \begin{table}[t] \caption{The best results before this paper and the new results. Here $D_n$ is the number of even minus odd Latin squares whose first row and first column are $1,\dots,n$. For a prime $q$, $v_q(x)$ is its exponent in a nonzero integer $x$, with $v_q(0)=\infty$.}\label{tab:results} \vspace{-4pt} \begin{center} \footnotesize \begin{tabular}{>{\raggedright\arraybackslash}p{0.46\textwidth}>{\raggedright\arraybackslash}p{0.46\textwidth}} \toprule Best result before this paper & New result\\ \midrule $c_n$ for $n\le9$ \cite[Section~5]{SW12} and $n=10$ (from \cite{Ber12}); for all even $n$: $n-1\mid c_n$ when $n-1$ is prime \cite{Dri97}, and no prime $q$ with $n/22$, a congruence modulo a divisor of $(n!)^3$ can prove the Alon--Tarsi conjecture at order $n$ exactly when $n-1$ is prime (Figure~\ref{fig:summary}). We prove Theorem~\ref{thm:A} one prime at a time. For a prime $q$ let $v_q(x)$ be the exponent of $q$ in a nonzero integer $x$, with $v_q(0)=\infty$. By the definition of $c_n$, $q\nmid c_n$ means that $q^{3v_q(n!)}$, the full power of $q$ in $(n!)^3$, divides $\Delta_n$. It is convenient to divide out a known factor: let $D_n$ be the number of even minus the number of odd \emph{reduced} Latin squares of order $n$, those whose first row and first column are $1,2,\dots,n$ in this order. For even $n$, $\Delta_n=n!\,(n-1)!\,D_n$ (see \eqref{eq:normal}), so $q\nmid c_n$ exactly when $D_n$ is divisible by \[ M_q(n)=q^{\,v_q(n!)+v_q(n)}, \] which we call the \emph{natural modulus} of $D_n$ at the prime $q$. A Sylow $q$-subgroup $G$ of $S_n^3$ has order $q^{3v_q(n!)}$, so \eqref{eq:orbit} determines $\Delta_n$ only modulo $q^{3v_q(n!)}$. After normalization, this is precisely the residue of $D_n$ modulo $M_q(n)$. Thus, for congruences modulo divisors of $(n!)^3$, the available $q$-adic information about $D_n$ is its residue modulo $M_q(n)$. Table~\ref{tab:results} compares our three theorems with what was known before. \begin{figure}[t] \input{fig/F2_evenodd.tex} \caption{An even and an odd Latin square of order $6$, with the sign of each row and each column ($6$ is the smallest even order with an odd square: every square of order $2$ or $4$ is even). The right square is the left one with two entries exchanged in each row that has blue shaded cells. The three row transpositions contribute $-1$, whereas the two column $3$-cycles contribute $+1$; hence the sign of the square changes.} \label{fig:evenodd} \end{figure} \begin{figure}[t] \input{fig/F1_summary.tex} \caption{Green marks a known usable prime for the specified congruence method; red marks its failure; grey hatching marks an undetermined value of $c_n$. Here $c_n=(n!)^3/\gcd(\Delta_n,(n!)^3)$ for even $n\le40$; $c_n=1$ blocks congruences modulo divisors of $(n!)^3$, not the Alon--Tarsi conjecture. Left: the computed values through $n=10$, and the known divisor $n-1$ at Drisko's orders. Right: Theorem A gives $c_n=n-1$ at Drisko's orders and $c_n=1$ otherwise, for even $n\ge8$; the pale dashed bars at $n=2,4,6$ are the computed values of Stones and Wanless. The smallest open order, $26$, is marked in bold in both panels; $c_{26}=1$.} \label{fig:summary} \end{figure} For even $n\ge8$, our second theorem gives divisibility by the natural modulus at every prime $q\le n-2$. \begin{mainthm}\label{thm:B} For every even $n\ge8$ and every prime $q\le n-2$, the natural modulus $M_q(n)=q^{\,v_q(n!)+v_q(n)}$ divides $D_n$. \end{mainthm} Every prime factor of $(n!)^3$ is at most $n-1$ when $n>2$ is even. Theorem~\ref{thm:B} therefore leaves only the prime $p=n-1$, when it is prime. There Drisko's congruence shows that $p$ exactly divides $c_n$. This is how Theorem~\ref{thm:A} follows (Section~\ref{sec:cn}). For $q=2$ and the odd primes $q\le n/3$ we prove Theorem~\ref{thm:B} through an exact identity instead of a congruence. For each fixed prime $q$, the bound we obtain, Theorem~\ref{thm:C}, grows quadratically in $n$. Let $f_q(n,N)$ be the least value of $v_q(m_1!\cdots m_N!)$ over all ways of writing $n=m_1+\dots+m_N$ with positive integers $m_i$. \begin{samepage} \begin{mainthm}\label{thm:C} For every even $n$ and every prime $q$, \[ v_q(L^e_n-L^o_n)\ \ge\ v_q\bigl((n-1)!\bigr)+\sum_{N=1}^{n-1}f_q(n,N). \] The right side is at least $v_q(n!\,(n-1)!)+a(a-1)/2$ with $a=\lfloor n/q\rfloor$, a bound that is quadratic in $n$ for every fixed $q$. For $q=2$ it is at least $v_2((n-1)!)+n^2/4$. \end{mainthm} \end{samepage} For example, the exact sum in Theorem~\ref{thm:C} gives $2^{181}\mid D_{26}$ (the form $n^2/4$ alone gives $2^{146}$). Before, only $2^{10}\mid D_{26}$ was known \cite[Theorem~3.2]{SW12} (also from $13!\mid D_{26}$ \cite[Theorem~2.14]{Ber12}), and the natural modulus is only $M_2(26)=2^{24}$. So the $2$-part of $D_n$ lies far beyond what any congruence modulo a divisor of $(n!)^3$ can see. Theorem~\ref{thm:C} is Theorem~\ref{thm:quadratic}(a), (b) and Corollary~\ref{cor:floor} below. \medskip \noindent\textbf{The ideas of the proofs.} The proof of Theorem~\ref{thm:B} splits the primes $q\le n-2$ into four ranges, each with its own argument (Figure~\ref{fig:primes}). \emph{The prime $2$ and the odd primes $q\le n/3$} (Section~\ref{sec:quadratic}). Here Theorem~\ref{thm:C} implies Theorem~\ref{thm:B}. It rests on an exact identity (Section~\ref{sec:circuit}): $L^e_n-L^o_n$ is, up to sign, $(n-1)!$ times the value at $x=-n$ of the circuit partition polynomial of the directed graph on $n-1$ vertices with one arc from each vertex to each other vertex and two loops at each vertex. This polynomial counts the ways of splitting the arcs into closed trails. A vertex can be removed by joining its incoming arcs to its outgoing ones (Figure~\ref{fig:elim}). At $x=-n$ each removal writes the value as the product of the factorials of the numbers of arcs into the removed vertex, times an integer combination of values for the smaller graphs. Removing the vertices one at a time collects one such product of factorials per step, and their exponents of $q$ add up to the quadratic bound. \emph{The odd primes $q$ with $n/3