TOPICS
Search

Agoh's Conjecture


Agoh's conjecture states that, with B_k denoting the kth Bernoulli number, the fractional congruence

 nB_(n-1)=-1 (mod n),

holds iff n 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 n=49999 (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 B_(n-1)=N_(n-1)/D_(n-1) in lowest terms, and let c(n) be the denominator in lowest terms of N_(n-1)/n+D_(n-1)/n^2. The values of c(n) for n=1, 2, ... begin 1, 1, 1, 16, 1, 36, 1, 64, 27, 100, ... (OEIS A309132). For n>1, the conjecture that c(n)=1 iff n 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 n=1, 2, ..., the minimal residues of nB_(n-1) (mod n) are 0, -1, -1, 0, -1, 0, -1, 0, -3, 0, -1, ... (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 n>=2,

 sum_(p|n; p-1|n-1)n/p=1 (mod n),

holds iff n is prime. Here the sum is over the prime divisors p of n satisfying p-1|n-1.


See also

Bernoulli Number, Congruence, Giuga's Conjecture, Minimal Residue

Explore with Wolfram|Alpha

References

Adamczewski, T. "OEIS Open: How Many Conjectures Can Language Models Turn into Theorems?" 13 Aug 2026. https://arxiv.org/abs/2608.11941.Borwein, D.; Borwein, J. M.; Borwein, P. B.; and Girgensohn, R. "Giuga's Conjecture on Primality." Amer. Math. Monthly 103, 40-50, 1996.Epoch AI. LeanOpenProblems-results. Accepted Lean submission for OEIS A309132, rev. 61137ec, 2026. https://github.com/epoch-research/LeanOpenProblems-results/blob/61137ec/runs/oeis-full-50usd-ant-j0j0g4uzligm1k41/oeis_309132_conjecture_2/Submission/Spec.lean.Kellner, B. C. Über irreguläre Paare höherer Ordnungen. Diplomarbeit. Göttingen, Germany: Mathematischen Institut der Georg August Universität zu Göttingen, 2002. https://www.bernoulli.org/~bk/irrpairord.pdf.Kellner, B. C. "The Equivalence of Giuga's and Agoh's Conjectures." 15 Sep 2004. https://arxiv.org/abs/math/0409259.Sloane, N. J. A. Sequences A046094 and A309132 in "The On-Line Encyclopedia of Integer Sequences."

Referenced on Wolfram|Alpha

Agoh's Conjecture

Cite this as:

Weisstein, Eric W. "Agoh's Conjecture." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/AgohsConjecture.html

Subject classifications