In number theory, the Fermat quotient of an integer a with respect to an odd prime p is defined as
or
This article is about the former; for the latter see p-derivation. The quotient is named after Pierre de Fermat.
If the base a is coprime to the exponent p then Fermat's little theorem says that q<sub>p</sub>(a) will be an integer. If the base a is also a generator of the multiplicative group of integers modulo p, then q<sub>p</sub>(a) will be a cyclic number, and p will be a full reptend prime.
From the definition, it is obvious that
In 1850, Gotthold Eisenstein proved that if a and b are both coprime to p, then:
Eisenstein likened the first two of these congruences to properties of logarithms. These properties imply
In 1895, Dmitry Mirimanoff pointed out that an iteration of Eisenstein's rules gives the corollary:
From this, it follows that:
M. Lerch proved in 1905 that
Here is the Wilson quotient.
Eisenstein discovered that the Fermat quotient with base 2 could be expressed in terms of the sum of the reciprocals modulo p of the numbers lying in the first half of the range {1, ..., p âÂÂ 1}:
Later writers showed that the number of terms required in such a representation could be reduced from 1/2 to 1/4, 1/5, or even 1/6:
Eisenstein's series also has an increasingly complex connection to the Fermat quotients with other bases, the first few examples being:
If q<sub>p</sub>(a) â¡ 0 (mod p) then a<sup>pâÂÂ1</sup> â¡ 1 (mod p<sup>2</sup>). Primes for which this is true for a = 2 are called Wieferich primes. In general they are called Wieferich primes base a. Known solutions of q<sub>p</sub>(a) â¡ 0 (mod p) for small values of a are:
For more information, see and.
The smallest solutions of q<sub>p</sub>(a) â¡ 0 (mod p) with a = n are:
A pair (p, r) of prime numbers such that q<sub>p</sub>(r) â¡ 0 (mod p) and q<sub>r</sub>(p) â¡ 0 (mod r) is called a Wieferich pair.