\appendix \section{The case \texorpdfstring{$p+2$}{p+2}}\label{sec:A} This appendix proves Berndsen's Theorem~\ref{thm:berndsen} with the methods of Sections~\ref{sec:3} to~\ref{sec:6}. It is not needed for the orders $26$, $94$ and $118$. \begin{proposition}\label{prop:A.1} Let $p$ be a prime and $n = p + 2$. Then $g_n(1-n) \equiv g_n(-1) - p \pmod{p^2}$. \end{proposition} \begin{proof} The Taylor expansion in the proof of Proposition~\ref{prop:4.1}, with $m = 2$, gives $g_n(1-n) \equiv g_n(-1) - p\, g_n'(-1) \pmod{p^2}$, and it remains to show $g_n'(-1) \equiv 1 \pmod p$. Corollary~\ref{cor:3.2} with $g_2 = 1$ gives $(t+1)\, g_n(t) = g_p(t+2)\,(t^p - t)^2$ in $\F_p[t]$. Write $t^p - t = (t+1)\,Q(t)$; then $g_n = g_p(t+2)\,(t+1)\,Q(t)^2$ and $g_n'(-1) = g_p(1)\, Q(-1)^2$. Here $Q(-1)$ is the derivative of $t^p - t$ at $-1$, which is $-1$ in $\F_p$, and $g_p(1) = ((p-1)!)^{p-1} \equiv 1$ by \eqref{eq:2.1} and Wilson's theorem. \end{proof} For $k = 1$, Lemmas~\ref{lem:5.1}, \ref{lem:5.3} and~\ref{lem:5.4} give a finite formula. Write $(n)_r = n(n-1)\cdots(n-r+1)$. \begin{theorem}\label{thm:A.2} For $n \ge 4$ and $a = 1/(n-2)$, \[ g_n(-1) = -\frac{((n-2)!)^n}{n^2 (n-3)!}\, T_n, \] where \[ T_n = n^n (1+a)^{n-1}\bigl(1 - (n-1)a\bigr) - \sum_{r=1}^{n-1} (n)_{r+1} (-1)^r n^{n-r} a^{r+1} (1+a)^{n-r-1} . \] \end{theorem} \begin{proof} By Lemmas~\ref{lem:5.1} and~\ref{lem:5.3}, with $\lambda(d_v) = a^{d_v}$, $T_n := S_n^{(1)} = \sum_\Phi (-1)^{|\Phi|} n^{n-|\Phi|}\, \Lambda_w(\Phi)$ with $w_0 = 1$, $w_1 = a$, where $\Phi$ runs over the forests of $K_n^*$ that consist of disjoint paths (a forest contained in a partial derangement has in-degrees at most $1$). By Lemma~\ref{lem:5.4} only $\Phi = \emptyset$ and the single paths contribute. The empty forest gives $n^n\bigl((1+a)^n - na(1+a)^{n-1}\bigr)$. A path with $r \ge 1$ arcs can be chosen in $(n)_{r+1}$ ways and gives $(-1)^r n^{n-r} \cdot \bigl(-a^{r+1}(1+a)^{n-r-1}\bigr)$. \end{proof} For example, $n = 5$ gives $g_5(-1) = 69504$, in agreement with Remark~\ref{ex:2.5}. \begin{theorem}\label{thm:A.3} For every prime $p \ge 3$, $g_{p+2}(-1) \equiv p\, K_2(p) \pmod{p^2}$. \end{theorem} \begin{proof} Let $n = p+2$, so $a = 1/p$ in Theorem~\ref{thm:A.2}. Multiplying by $p^{p+2}$, \[ p^{p+2} T_n = -n^n (p+1)^{p+1} - \sum_{r=1}^{p+1} (n)_{r+1} (-1)^r n^{n-r} (p+1)^{p+1-r} . \] The term $r = 1$ equals $n(n-1)\, n^{n-1}(p+1)^p = n^n (p+1)^{p+1}$ and cancels the first term. For $2 \le r \le p+1$ the falling factorial $(n)_{r+1} = (p+2)(p+1)p(p-1)\cdots(p+2-r)$ contains exactly one factor $p$, and modulo $p$ the quotient is $2\,(-1)^{r-2}(r-2)!$. Also $n^{n-r} \equiv 2^{p+2-r} \equiv 2^{3-r}$ by Fermat's theorem. Hence \[ \frac{p^{p+2}T_n}{p} \equiv -\sum_{r=2}^{p+1} 2^{4-r}(r-2)! = -4 K_2(p) \pmod p . \] By Theorem~\ref{thm:A.2}, $g_n(-1) = -((p-1)!)^{p+1}\, p^{p+2}T_n / (p+2)^2$, and $((p-1)!)^{p+1} \equiv 1$, $(p+2)^2 \equiv 4$ modulo $p$, which gives the claim. \end{proof} \begin{proof}[Proof of Theorem~\ref{thm:berndsen}] For $n = p+2$, Proposition~\ref{prop:A.1} and Theorem~\ref{thm:A.3} give $g_n(1-n) \equiv p\,(K_2(p) - 1) \pmod{p^2}$, and $U_n = g_n(1-n)$ since $n$ is odd (Lemma~\ref{lem:2.4}). Finally $K_2(p) - 1 = \sum_{j=1}^{p-1} j!\,2^{-j}$. \end{proof}