# Fermat quotient

If $a$ is an integer not divisible by a positive prime $p$, then Fermat’s little theorem (a.k.a. Fermat’s theorem) guarantees that the difference  $a^{p-1}\!-\!1$ is divisible by $p$.  The integer

 $q_{p}(a)\;:=\;\frac{a^{p-1}\!-\!1}{p}$

is called the Fermat quotient  of $a$ modulo $p$.  Compare it with the Wilson quotient  $w_{p}$, which is similarly related to Wilson’s theorem.

 $\sum_{a=1}^{p-1}q_{p}(a)\;\equiv\;w_{p}\;\,\pmod{p}$

for an odd prime $p$ connects the Fermat quotients and the Wilson quotient.

If $p$ is a positive prime but not a Wilson prime  , and $w_{p}$ is its Wilson quotient, then the expression

 $q_{p}(w_{p})\;=\;\frac{w_{p}^{p-1}\!-\!1}{p}$

is called the Fermat–Wilson quotient of $p$.  Sondow proves in  that the greatest common divisor   of all Fermat–Wilson quotients is 24.

## References

• 1 Jonathan Sondow:  Lerch Quotients, Lerch Primes, Fermat–Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771. Available at http://arxiv.org/pdf/1110.3113v3.pdfarXiv.
Title Fermat quotient FermatQuotient 2013-03-22 19:34:22 2013-03-22 19:34:22 pahio (2872) pahio (2872) 12 pahio (2872) Definition msc 11A51 msc 11A41 Lerch’s formula Fermat–Wilson quotient