giuga_conjecture
Openconjecturemodular-arithmeticnumber-theoryprime-numbers
Giuga's Conjecture: is prime if and only if .
Proposed by Giuseppe Giuga (1950). The forward direction (prime congruence) follows from Fermat's little theorem. The backward direction is open. Any counterexample would be a Giuga number that is not prime, and must have at least 14,000 digits. Related to Agoh's conjecture and Bernoulli numbers.
Source: Giuga, G. (1950). Su una presumibile proprietà caratteristica dei numeri primi. Ist. Lombardo Sci. Lett. Rend. A., 83, 511–528.
Preamble
import Mathlib
Formal statement
theorem giuga_conjecture (n : ℕ) (hn : 2 ≤ n) :
Nat.Prime n ↔
(∑ k ∈ Finset.Icc 1 (n - 1), (k : ZMod n) ^ (n - 1)) = (-1 : ZMod n) := by
sorrySource