■ Change #433 · 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 545a22327f7dd67d7d17d4aa3800d0b888ccda5cc350771c997e73c18dc98eac
previous 1f8b6b312f2505a10b847783c2b5f1b4b94485f9493a3f3a32b297d8757ff471