Agoh's conjecture states that, with denoting the
th Bernoulli number, the
fractional congruence
holds iff is prime. Here residues of
fractions are interpreted in the usual way so as to yield integers,
after which the minimal residue is taken. There
are no counterexamples less than
(S. Plouffe, pers. comm., Jan. 28, 2003).
Any counterexample to Agoh's conjecture would be a contradiction to Giuga's
conjecture, and vice versa.
A related sequence is defined as follows. Write the Bernoulli number
in lowest terms, and let
be the denominator in lowest
terms of
.
The values of
for
,
2, ... begin 1, 1, 1, 16, 1, 36, 1, 64, 27, 100, ... (OEIS A309132).
For
,
the conjecture that
iff
is prime is equivalent to
the Agoh-Giuga conjecture (Adamczewski 2026). This equivalence has an AI-generated
proof formally verified in Lean (Epoch AI 2026).
For ,
2, ..., the minimal residues of
(mod
) are 0,
,
, 0,
, 0,
, 0,
, 0,
, ... (OEIS A046094).
Kellner (2004) gave a direct proof of the equivalence of Giuga's and Agoh's conjectures. The resulting
Giuga-Agoh conjecture states that, for an integer ,
holds iff is prime. Here the sum is
over the prime divisors
of
satisfying
.