---
title: Wilson Quotient in Number Theory
url: https://www.emergentmind.com/topics/wilson-quotient
type: topic
---

# Wilson Quotient in Number Theory

The Wilson quotient is the integer
$$
W_p=\frac{(p-1)!+1}{p},
$$
defined for a prime $p\ge 3$. Its integrality is a direct consequence of Wilson’s theorem, and its arithmetic role is to quantify the extent to which the congruence $(p-1)!\equiv -1\pmod p$ fails to be an exact identity in $\mathbb Z$. In current work, the Wilson quotient appears simultaneously as a classical invariant of primes, a $p$-adic object admitting higher-power refinements, and a node in a wider network of congruences involving left factorials, Bell numbers, Fermat quotients, and generalized Wilson-type quotients [2604.09714] [2509.05235] [2505.16201].

## 1. Definition and immediate consequences

For a prime $p$, Wilson’s theorem states that
$$
(p-1)!\equiv -1\pmod p.
$$
A standard proof considers the factorization of $x^{p-1}-1$ over $\mathbb Z/p\mathbb Z$:
$$
x^{p-1}-1\equiv (x-1)(x-2)\cdots(x-(p-1))\pmod p,
$$
and evaluates at $x=0$ to obtain $-1\equiv (p-1)!\pmod p$, since $p-1$ is even. An equivalent derivation uses the multiplicative group $(\mathbb Z/p\mathbb Z)^\times$ [2604.09714].

Because $p\mid (p-1)!+1$, the quotient
$$
W_p=\frac{(p-1)!+1}{p}
$$
lies in $\mathbb Z$. Equivalently,
$$
(p-1)!=-1+p\,W_p.
$$
This makes $W_p$ the first-order correction term to Wilson’s congruence in the $p$-adic direction. The quantity is often studied modulo powers of $p$, not only modulo $p$ itself, because higher congruence data encode substantially finer information than the classical statement alone [2604.09714] [2510.26743].

A useful characterization is that
$$
(p-1)!+1\equiv 0\pmod{p^2}
$$
if and only if $p$ is a Wilson prime. This is precisely the condition $W_p\equiv 0\pmod p$ [2604.09714].

## 2. Wilson primes, elementary examples, and residue-level behavior

A prime $p$ is called a Wilson prime if
$$
W_p\equiv 0\pmod p.
$$
Only three are known:
$$
p=5,\;13,\;563.
$$
The associated open problem asks whether there are infinitely many Wilson primes or only finitely many; the data under discussion records that this remains open [2604.09714].

For small primes, the quotient is explicit. When $p=3$,
$$
W_3=\frac{2!+1}{3}=1.
$$
When $p=5$,
$$
W_5=\frac{4!+1}{5}=5,
$$
so $5$ is a Wilson prime. When $p=7$,
$$
W_7=\frac{6!+1}{7}=103.
$$
These examples already show that integrality of $W_p$ is universal for primes, whereas vanishing modulo $p$ is exceptional [2604.09714].

The residue class of $W_p$ modulo $p$ is also tied to classical congruences of Lerch type. In particular, later higher-power work recovers
$$
W_p\equiv Q_p(1)\pmod p,
$$
where
$$
q_p(a)=\frac{a^{p-1}-1}{p},
\qquad
Q_p(k)=\sum_{a=1}^{p-1} q_p(a)^k.
$$
Thus the mod-$p$ Wilson quotient is expressible as a power sum of Fermat quotients, linking Wilson’s theorem to a separate but closely related arithmetic framework [2509.05235].

## 3. Left factorials, Bell numbers, and the Kurepa–Bell–Wilson congruence

The Wilson quotient enters a broader combinatorial-arithmetic structure through the left-factorial sequence and the Bell numbers. For odd primes $p\ge 3$, the left factorial is
$$
K_p=\sum_{k=0}^{p-1}k!,
$$
while the Bell numbers $\Bell_n$ count set partitions and satisfy the exponential generating function
$$
\sum_{n=0}^\infty \Bell_n\frac{x^n}{n!}=\exp\bigl(e^x-1\bigr).
$$
Gertsch’s congruence asserts that for every odd prime $p\ge 3$,
$$
K_p\equiv \Bell_{p-1}-1\pmod p.
$$
According to the cited account, this follows from combining Touchard’s congruences for Bell polynomials with the congruence $(p-1)!\equiv -1\pmod p$ [2604.09714].

Within this setting, the paper "The Wilson Quotient, Left Factorials, Bell Numbers, and the Kurepa–Bell–Wilson Congruence" formulates the Kurepa–Bell–Wilson congruence:
$$
\frac{K_p+1}{p}\equiv \frac{\Bell_{p-1}-1}{p}+W_p \pmod p.
$$
This congruence makes the Wilson quotient an additive component in a decomposition of a normalized left-factorial expression, with the Bell-number term furnishing the complementary component [2604.09714].

The same work defines the Gertsch quotient
$$
\mathbb G_p=\frac{K_p-\Bell_{p-1}+1}{p}
=\frac{\sum_{k=0}^{p-1}k!-\Bell_{p-1}+1}{p}\in\mathbb Z.
$$
From the KBW congruence one obtains
$$
\mathbb G_p\equiv W_p\pmod p.
$$
Hence $\mathbb G_p$ is an integer lift of the residue of $W_p$. The paper further interprets this lift in the “poor man’s adele ring”
$$
\mathcal A=\Bigl(\prod_p \mathbb Z/p\Bigr)\Big/\Bigl(\bigoplus_p \mathbb Z/p\Bigr),
$$
via the natural diagonal embedding of $\mathbb Q$ [2604.09714].

The small-prime instances given in the source illustrate the congruence concretely. For $p=3$, one has $\mathbb G_3=1$ and $W_3=1$. For $p=5$, one has $\mathbb G_5=4$ and $W_5=5$, hence both are congruent modulo $5$. For $p=7$, one has $\mathbb G_7=96$ and $W_7=103$, again with
$$
\mathbb G_p\equiv W_p\pmod p.
$$
The same source records that no prime $p\ge 3$ is known for which $\mathbb G_p\equiv 0\pmod p$ [2604.09714].

## 4. Supercongruences and higher prime-power expansions

A major contemporary development is the extension of Wilson’s theorem from modulus $p$ to arbitrary higher powers $p^n$. For an odd prime $p$ with $p>n$, Kellner proves that there exist unique multivariate polynomials
$$
\psi_\nu(x_1,\dots,x_\nu)\in \mathbb Z[x_1,\dots,x_\nu],
\qquad \nu\ge 1,
$$
each with no constant term, such that
$$
W_p\equiv
\sum_{\nu=1}^{n}
\frac{p^{\nu-1}}{\nu!}\,
\psi_\nu\bigl(Q_p(1),Q_p(2),\dots,Q_p(\nu)\bigr)
\pmod{p^n},
$$
and equivalently
$$
(p-1)!\equiv -1+
\sum_{\nu=1}^{n}
\frac{p^\nu}{\nu!}\,
\psi_\nu\bigl(Q_p(1),\dots,Q_p(\nu)\bigr)
\pmod{p^{n+1}}.
$$
For $n=1$ this reproduces Lerch’s congruence
$$
W_p\equiv Q_p(1)\pmod p,
\qquad
(p-1)!\equiv -1+p\,Q_p(1)\pmod{p^2}
$$
[2509.05235].

The construction uses partial Bell polynomials and Newton’s identities. The elementary symmetric sums of the family $\{q_p(1),\dots,q_p(p-1)\}$ are rewritten in terms of the power sums $Q_p(k)$, and the key factorization
$$
\prod_{a=1}^{p-1}(1+p\,q_p(a))=(1-p\,W_p)^{p-1}
$$
then ties the resulting symmetric-polynomial data to powers of $W_p$. The recursion for the $\psi_\nu$ is uniform in $p$, and the low-degree cases are explicitly
$$
\psi_1=x_1,\qquad
\psi_2=2x_1-x_1^2-x_2,
$$
$$
\psi_3=6x_1-6x_1^2+x_1^3+3x_1x_2-3x_2+2x_3
$$
[2509.05235].

A further refinement computes the Wilson quotient modulo $p^5$ and $p^6$, and equivalently $(p-1)!$ modulo $p^6$ and $p^7$, respectively. In that framework one introduces the divided Bernoulli numbers
$$
{}_n=\frac{B_{n(p-1)}+\frac1p-1}{n(p-1)}
\quad\text{and}\quad
{}_{n,d}=\frac{B_{n(p-1)-d}}{n(p-1)-d}
\quad(d=2,4),
$$
which lie in $\mathbb Z_p$ and satisfy the usual Kummer congruences. For $p\ge 7$,
$$
W_p\equiv \omega_1+\omega_2\,p+\omega_3\,p^2+\omega_4\,p^3+\omega_5\,p^4\pmod{p^5},
$$
and for $p\ge 11$,
$$
W_p\equiv \sum_{\nu=1}^6 \omega_\nu p^{\nu-1}\pmod{p^6}.
$$
The coefficients $\omega_\nu$ admit closed forms in the divided Bernoulli numbers; for instance,
$$
\omega_1\equiv -6\,{}_1+15\,{}_2-20\,{}_3+15\,{}_4-6\,{}_5+{}_6\pmod{p^6}
$$
in the modulus-$p^7$ theorem [2510.26743].

The higher-power study also records a regular pattern in the reductions $\omega_\nu\pmod p$: the subsequence of pure powers $-\,{}_1^\nu/\nu!$ appears, along with analogous universal terms in ${}_{1,2}$ and ${}_{1,4}$. The paper formulates the conjectural regularity that for all $\nu$, the reduction $\omega_\nu\pmod p$ is a $\mathbb Q$-linear combination of monomials
$$
{}_1^\alpha\,{}_{1,2}^\beta\,{}_{1,4}^\gamma
\qquad (\alpha+2\beta+4\gamma=\nu),
$$
with rational coefficients depending only on $(\alpha,\beta,\gamma)$ [2510.26743].

## 5. Generalized Wilson-type quotients

The ordinary Wilson quotient is the first member of a larger family arising from an extended corollary of Wilson’s theorem. For any integer $n\ge 1$ and any integer $k$ with $0\le k<n$,
$$
(-1)^k\,k!\,(n-k-1)!\equiv -1\pmod n
\quad\Longleftrightarrow\quad
n\in\{1\}\cup\{\text{primes}\}.
$$
When $k=0$, this recovers Wilson’s theorem [2505.16201].

For a prime $p$, Morozov defines
$$
Q_k(p)=\frac{1+(-1)^{k-1}(k-1)!(p-k)!}{p},
\qquad k=1,2,\dots,p.
$$
The case $k=1$ is exactly the Wilson quotient:
$$
Q_1(p)=\frac{(p-1)!+1}{p}=W_p.
$$
Thus the classical quotient sits inside a finite family of quotients indexed by the position of the factorial split [2505.16201].

This family satisfies closed-form summation identities. For
$$
S_m(p)=\sum_{k=1}^{m}Q_k(p),
\qquad 1\le m\le p,
$$
one has
$$
\sum_{k=1}^{m}Q_k(p)
=
\frac{m}{p}
+
\frac{(p-1)!}{p}
\sum_{j=0}^{m-1}\frac{(-1)^j}{\binom{p-1}{j}}.
$$
At the residue level, Morozov proves Lehmer-type congruences:
$$
Q_k(p)\equiv B_{2(p-1)}-B_{p-1}-H_{k-1}\pmod p,
\qquad k=1,\dots,p,
$$
where $B_k$ are Bernoulli numbers and $H_k$ are harmonic numbers. The paper also gives the $p^2$-level congruence
$$
p-1+p\,t\,M_k(p)\equiv p\,B_{t(p-1)}-p\,t\,H_k\pmod{p^2},
\qquad t\in\mathbb Z
$$
for the related notation $M_k(p)$ [2505.16201].

The sequence additionally admits an exponential generating function. For fixed $k$,
$$
\EG[M_k(n);x]
=
\sum_{n=0}^\infty M_k(n+k+1)\frac{x^n}{n!},
\qquad |x|<1,
$$
and
$$
\EG[M_k(n);x]
=
(-1)^k\left(
k!\,\Phi(x,1,k+1)-\frac{\gamma(k+1,-x)}{x^{k+1}}
\right),
\qquad R_{\rm conv}=1.
$$
Since $Q_{k+1}(p)=M_k(p)$, the same EGF describes the sequence $p\mapsto Q_{k+1}(p)$ [2505.16201].

## 6. Open questions and conceptual significance

The classical open problem concerns Wilson primes: whether the condition $W_p\equiv 0\pmod p$ is satisfied for infinitely many primes, or only finitely many. The available data record only the three known examples $5,13,563$ [2604.09714].

A parallel question arises from the Gertsch quotient. Since
$$
\mathbb G_p\equiv W_p\pmod p,
$$
one may ask whether there exist primes $p\ge 3$ with $\mathbb G_p\equiv 0\pmod p$. The cited source states that no such prime is known, and that a search up to large bounds has turned up no example. A plausible implication is that the Bell-factorial lift encoded by $\mathbb G_p$ is at least as sparse in its vanishing behavior as the ordinary Wilson quotient, though the data stop short of a structural explanation [2604.09714].

The higher-power theory indicates that the Wilson quotient is not merely a residue-level invariant but part of a full $p$-adic expansion controlled by recursively computable polynomials in Fermat-quotient power sums and, at deeper levels, by divided Bernoulli data [2509.05235] [2510.26743]. This suggests that Wilson’s theorem fits naturally into a supercongruence framework alongside Bell polynomials, Newton identities, and Kummer-type congruences.

From the conceptual viewpoint emphasized in the KBW setting, the quantity $(K_p+1)/p$ in $\mathcal A$ decomposes into a Bell-part and a Wilson-part. The source explicitly notes that the interplay among $W_p$, $\mathbb G_p$, and $(K_p+1)/p$ suggests new analogues of Euler’s constant and multiple-zeta-value phenomena in the finite-modulus setting, and asks how this decomposition extends to higher factorial sums or other combinatorial sequences [2604.09714]. Within that perspective, the Wilson quotient functions simultaneously as a classical correction term, a modular residue, a $p$-adic coefficient, and a bridge between factorial arithmetic and combinatorial enumeration.

Source: https://www.emergentmind.com/topics/wilson-quotient