Hellenica World


In number theory the Agoh–Giuga conjecture on the Bernoulli numbers \( Bk \) postulates that p is a prime number if and only if

\( pB_{p-1} \equiv -1 \pmod p. \)

The conjecture as stated is due to Takashi Agoh (1990); an equivalent formulation is due to Giuseppe Giuga, from 1950, to the effect that p is prime iff

\( 1^{p-1}+2^{p-1}+ \cdots +(p-1)^{p-1} \equiv -1 \pmod p \)

which may also be written as

\( \sum_{i=1}^{p-1} i^{p-1} \equiv -1 \pmod p. \)

It is trivial to show that p being prime is sufficient for the second equivalence to hold, since if p is prime, Fermat's little theorem states that

\( a^{p-1} \equiv 1 \pmod p \)

for \( a = 1,2,\dots,p-1 \), and the equivalence follows, since \( p-1 \equiv -1 \pmod p \).

The statement is still a conjecture since it has not yet been proven that if a number n is not prime (that is, n is composite), then the formula does not hold. It has been shown that a composite number n satisfies the formula iff it is both a Carmichael number and a Giuga number, and that if such a number exists, it has at least 13,800 digits (Borwein, Borwein, Borwein, Girgensohn 1996).

The Agoh-Giuga conjecture bears a similarity to Wilson's theorem, which has been proven to be true. Wilson's theorem states that a number p is prime iff

\( (p-1)! \equiv -1 \pmod p \)

which may also be written as

\( \prod_{i=1}^{p-1} i \equiv -1 \pmod p \)

or, for odd prime p

\( \prod_{i=1}^{p-1} i^{p-1} \equiv (-1)^{p-1} \equiv +1 \pmod p \)

and, for even prime p=2

\( \prod_{i=1}^{p-1} i^{p-1} \equiv (-1)^{p-1} \equiv -1 \equiv +1 \pmod p. \)

So, the truth of the Agoh-Giuga conjecture combined with Wilson's theorem would give: a number p is prime iff

\( \sum_{i=1}^{p-1} i^{p-1} \equiv -1 \pmod p, \)


\( \prod_{i=1}^{p-1} i^{p-1} \equiv +1 \pmod p. \)


Agoh, T, "On Giuga’s conjecture" Manuscripta Math., 87(4), 501–510 (1995).
Borwein, D.; Borwein, J. M., Borwein, P. B., and Girgensohn, R. "Giuga's Conjecture on Primality", American Mathematical Monthly, 103, 40–50, (1996). pdf
Giuga, G. "Su una presumibile proprietà caratteristica dei numeri primi", Ist. Lombardo Sci. Lett. Rend. A, 83, 511–528 (1950).

Mathematics Encyclopedia

Retrieved from "http://en.wikipedia.org/"
All text is available under the terms of the GNU Free Documentation License