TOPICS
Search

Fermat Quotient


The Fermat quotient for a number a and a prime base p is defined as

 q_p(a)=(a^(p-1)-1)/p.
(1)

If pab, then

q_p(ab)=q_p(a)+q_p(b)
(2)
q_p(p+/-1)=∓1
(3)

(mod p), where the modulus is taken as a fractional congruence.

The special case a=2 is given by

q_p(2)=(2^(p-1)-1)/p
(4)
=1/2sum_(k=1)^(p-1)((-1)^(k-1))/k
(5)
=1/2ln2+1/4(-1)^p[gamma_0(1/2(p+1))-gamma_0(1/2p)]
(6)
=1/2sum_(k=(p+1)/2)^(p-1)1/k
(7)
=1/2[gamma_0(p)-gamma_0(1/2(p+1))],
(8)

all again (mod p) where the modulus is taken as a fractional congruence, gamma_0(z) is the digamma function, and the last two equations hold for odd primes only.

q_p(2) is an integer for p a prime, with the values for p=2, 3, 5, ... being 1, 3, 2, 5, 3, 13, 3, 17, 1, 6, ....

The quantity q_p(2)=(2^(p-1)-1)/p is known to be congruent to zero (mod p) for only two primes: the so-called Wieferich primes 1093 and 3511 (Lehmer 1981, Crandall 1986).


See also

Wieferich Prime

Explore with Wolfram|Alpha

References

Crandall, R. Projects in Scientific Computation. New York: Springer-Verlag, 1986.Dickson, L. E. History of the Theory of Numbers, Vol. 1: Divisibility and Primality. New York: Dover, p. 105, 2005.Lehmer, D. H. "On Fermat's Quotient, Base Two." Math. Comput. 36, 289-290, 1981.Wells, D. The Penguin Dictionary of Curious and Interesting Numbers. Middlesex, England: Penguin Books, p. 70, 1986.

Referenced on Wolfram|Alpha

Fermat Quotient

Cite this as:

Weisstein, Eric W. "Fermat Quotient." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/FermatQuotient.html

Subject classifications