## The Giuga-Agoh conjecture and additive combinatorics

In 1950, Giuseppe Giuga conjectured that $p$ is prime iff $1+1^{p-1}+2^{p-1}+\dots + (p-1)^{p-1} \equiv -1\ (\mod p)$. It was later shown by Takashi Agoh that it is equivalent to the conjecture he had made independently $p$ is prime iff $pB_{p-1}\equiv -1\ (\mod p)$ where the $B_k$ are Bernouilli numbers, thus becoming the Giuga-Agoh conjecture.

Borwein et al. have shown that the conjecture is true for numbers with at least up to 13800 digits (yes, that means the conjecture is true for all primes less than something like billions of billions of billions of billions…). More recently Vicentiu Tipu has shown (using methods similar to those used to deal with Carmichael numbers) that the number $G(X)$ of possible counterexamples to the conjecture (i.e. composite numbers satisfying the congruence) at least doesn’t grow too much at infinity: $G(X) \ll \sqrt{X}\log X$, for large $X$.

Now, stated with the congruence above, the conjecture might seem to the reader to be yet another of those probably-true-but-uninteresting statements that one encounters in elementary number theory. Yet, I’d like to think it’s not the case.

For instance let me simply rewrite it in the following form

$p\in\mathbb{P} \Leftrightarrow a_p:=\frac{1+1^{p-1}+2^{p-1}+\dots +(p-1)^{p-1}}{p}\in\mathbb{N}$

This is a simple $(p-1)-$dimensional euclidian additive statement saying that the Cesaro mean of the unity plus the sum of the first $p-1$ cubes is an integer, i.e. a nice average, only when $p$ is prime. Can this be related to the recent results of ergodic theory linked to additive combinatorics ?

At least I could show (it’s easy) that this is stronger than the well-known multiplicative (and useless) Wilson characterization of primes. So the Giuga-Agoh conjecture is a non-trivial window into the additive structure of the primes: if one could independently control or even obtain exact results on the sequence $(a_p)$ (which is A071871) then this would immediately translate into statements on the primes…