# Fermat quotient

By Fermat's Little Theorem, the quotient (*a*^{p-1}-1)/*p* must be an
integer. This integer (here denoted q_{p}(*a*)) is the **Fermat quotient of p
(with base a)**. Below are just a few of the nice properties of these
numbers.

- q
_{p}(*ab*) = q_{p}(*a*) + q_{p}(*b*) (mod*p*) - q
_{p}(*p*-1) = 1 (mod*p*) - q
_{p}(*p*+1) = -1 (mod*p*) - -2 q
_{p}(2) = 1 + 1/2 + 1/3 + 1/4 + ... + 1/((*p*-1)/2) (mod*p*)

(Eisenstein proved all of these in 1850.)

Finally, note that q_{p}(*a*)=0
(mod *p*) is the same as requiring

a^{p-1}= 1 (modp^{2}).

The case *a*=2 is the Wieferich primes. Below
we list several examples of solutions to this
congruence from Wilfrid Keller and
Jörg Richstein's web page (also linked below).
Before Wiles proved Fermat's Last Theorem in 1995,
this congruence provided the most powerful tool
for proving the first case. Wieferich proved in 1909
that if FLT holds for *p*, then it must satisfy
this congruence with *a*=2. In 1910 Mirimanoff
extended this to the case *a*=3. As time went on,
this was extended up through *a*=89 [Granville87] (this
is enough to show that the first case of FLT is false
for all exponents *n* less than
23,270,000,000,000,000,000).

Solutions of a^{p-1}= 1 (modp^{2}) for odd prime basesaaValues of p311, 1006003 520771, 40487, 53471161, 1645333507, 6692367337, 188748146801 75, 491531 1171 13863, 1747591 173, 46021, 48947 193, 7, 13, 43, 137, 63061489

**Related pages** (outside of this work)

- Fermat quotients that are divisible by
*p*by Wilfrid Keller and Jörg Richstein - Fermat Primes by Gottfried Helms

**References:**

- Granville87
A. Granville, "Diophantine equations with varying exponents," Ph.D. thesis, Queen's University in Kingston, (1987)- Keller98
W. Keller, "Prime solutionspofa^{p-1}≡ (mod p^{2}) for prime basesa,"Abstracts Amer. Math. Soc.,19(1998) 394.- Ribenboim83
P. Ribenboim, "1093,"Math. Intelligencer,5:2 (1983) 28--34.MR 85e:11001[(Lists many nice properties of these numbers)]- Ribenboim95 (pp. 335-6, 345-9)
P. Ribenboim,The new book of prime number records, 3rd edition, Springer-Verlag, 1995. New York, NY, pp. xxiv+541, ISBN 0-387-94457-5.MR 96k:11112[An excellent resource for those with some college mathematics. Basically a Guinness Book of World Records for primes with much of the relevant mathematics. The extensive bibliography is seventy-five pages.]