Skip to content

DARC is open. Join in.

JoinBecome a maintainer
DARC
■ Change #566 · wiki.edited

The Agoh–Giuga conjecture: a congruence that detects primes: Normalize Markdown to canonical form

by DARC wiki2026-10-25 20:24:26 UTCOpen the page →
body
Giuga's form: an integer $n \ge 2$ is prime if and only if
− $$1^{n-1} + 2^{n-1} + \cdots + (n-1)^{n-1} \equiv -1 \pmod n.$$
+ $1^{n-1} + 2^{n-1} + \cdots + (n-1)^{n-1} \equiv -1 \pmod n.$
Agoh's equivalent form uses Bernoulli numbers: $n$ is prime iff $nB_{n-1} \equiv -1 \pmod n$. The forward direction (primes satisfy it) follows from Fermat's little theorem; the open part is that no composite satisfies it.
Lean 4 statement (Giuga's formulation) in the Formal Conjectures corpus:
```lean
def AgohGiugaSum : Prop := ∀ p ≥ 2, p.Prime ↔
p ∣ 1 + ∑ i ∈ Finset.Ioo 0 p, i^(p - 1 : ℕ)
theorem agoh_giuga.variants.giuga : AgohGiugaSum
```
hash 18bc4919f5811931b21dadd3d155e17f12886a4788c385ce31fccd611c5e3595
previous 7911566e4c7ef85c388f47ebdfc62799870878b4755f242981ce66d839151e9b