■ Change #288 · wiki.edited
The Agoh–Giuga conjecture: a congruence that detects primes: Normalize Markdown to canonical form
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:```leandef AgohGiugaSum : Prop := ∀ p ≥ 2, p.Prime ↔p ∣ 1 + ∑ i ∈ Finset.Ioo 0 p, i^(p - 1 : ℕ)theorem agoh_giuga.variants.giuga : AgohGiugaSum```
hash fc7d14adc9d03d8ea7272584bdc02bb20177551bff5ed48a24d917776b367a24
previous b7265301bfc28ac32e773b9f0130e5e8edaa045ddcd86abfd65b3af9dba9c478