Chap. Ill] FeRMAt's AND WiLSON's THEOREMS. 63 
Finally, Lagrange proved the converse of Wilson's theorem: If n divides 
l + (n— 1)!, then n is a prime. For n = 4m+l, w is a prime if (2-3. . .2my 
has the remainder —1 when divided by n. For n = 4m — 1, if (2m — 1)! has 
the remainder =±=1. 
L. Euler^" also proved by induction from a: = n to n+1 that 
(2) xl = a'-x{a-ir+(^iya-2r-(^f){a-Sr+..., 
which reduces to (1) ior x = p — l, a = p; and more generally, 
(3) a^_n{a-ir+(^){a-2y- . . . +(-l)^Q (a-A:r+ . . . =|^, ^^ 
x<n 
x = n. 
D'Alembert^^ stated that the theorem that the difference of order m of a*" 
is m ! had been long known and gave a proof. 
L. Euler^^ made use of a primitive root a of the prime p to prove Wilson's 
theorem (though his proof of the existence of a was defective). When 
l,a,a^, . . ., oF~^ are divided by p, the remainders are 1, 2, 3, . . . , p — 1 in some 
order. Hence a(p-i)(p-2)/2 j^^s the same remainder as (p — 1) !. Taking p>2, 
we may set p = 2n+l. Since a" has the remainder —1, then a"a^"^'*~^\ and 
hence also (p — 1)!, has the remainder —1. 
P. S. Laplace^^ proved Fermat's theorem essentially by the first method 
of Euler^° without citing him: If a is an integer <p not divisible by the 
prime p, 
^l = \a-l^lY = \\{a-iy+p{a-iy-'+ . . . +l[ , 
a a a 
aV-^-\=-\{a-lY-\-l-a+hp{a-V)\ =^—^\{a-iy-^-l+hp] . 
a Cv 
Hence by induction a^~^ — l is divisible by p. For a>p, set a = np+q and 
use the theorem for q. 
He gave a proof of Euler's^^ generalization by the method of powering: 
if n = p''p{\ . ., where p, Pi,... are distinct primes, and if a is prime to n, 
then d° — l is divisible by n, where 
-"(^)(^) ■='^' 
q = p''-\p-l), r = pr-\Pi-l)P2''-\p2-l).. .. 
Set a'^ = x. Then a' — l=x'" — 1 is divisible by x — 1. Using the binomial 
theorem and a^~^ — l = hp, we find that aj — 1 is divisible by p". 
"Novi Comm. Ac. Petrop., 13, 1768, 28-30. 
"Letter to Turgot, Nov. 11, 1772, in unedited papers in the Biblioth^que de I'lnstitut de 
France. Cf. BuU. Bibl. Storia Sc. Mat. e Fis., 18, 1885, 531. 
"Opuscula analytica, St. Petersburg, 1, 1783 [Nov. 15, 1773], p. 329; Comm. Arith., 2, p. 44; 
letter to Lagrange (Oeuvres, 14, p. 235), Sept. 24, 1773; Euler's Opera postuma, I, 583. 
"De la Place, Th^orie abr^g^e des nombres premiers, 1776, 16-23. His proofs of Fermat's 
and Wilson's theorems were inserted at the end of Bossut's Algdbre, ed. 1776, and 
reproduced by S. F. Lacroix, Trait6 du Calcul Diff. Int., Paris, ed. 2, vol. 3, 1818, 722-4, 
on p. 10 of which is a proof of (2) for o=a; by the calculus of differences. 
