ON THE THEORY OF NUMBERS. 235 



p(p-l)(p-2)(p-3) Q-l)0>-3) (/)-2)(p-3) 



c5A3_ 1.2.3.4. + 1.2.3 1+ 1.2 A > 



(p— l)A p _, = l + A 1 + A 2 + A 3 + ... + A /) _2. 



From these equations we successively infer the congruences Aj^O, A 2 ^0, 

 A 3 = 0, ... Ap-2^0, and lastly A,,_i = — 1, mod p. We have, therefore, 

 the indeterminate congruence (#+1) (x+2) (x+3) . . . (x+p~ 1) = xP~ l 

 — 1, mod p, which is evidently identical, i. e. it subsists for all values of x. And 

 since, if a v a 2 . . a p -\ be the terms of any system of residues prime to p, 

 the factors x—a v x—a 2 , x—a 3 , . . . x— a p - X , are one by one congruous to the 

 factors x + 1, x + 2, x + 3, . . x+p — 1 taken in a certain order, the products 



(x—a x ) (x— a 2 ) ... (x— Op-i) and (x+\) (x + 2) . . . (x+p—1) 



are also identically congruous for the modulus p, so that we may write 



(<r— aj)(;c— « 2 ) . . .(#— Op-i)^^- 1 — 1, niod^. 



This congruence exhibits in the clearest manner possible what the real 

 nature of the function xp~ 1 — 1 is when considered with respect to the modu- 

 lus p, and explains to us why it assumes a value divisible by p, when we 

 assign to x any integral value not divisible by p. 



It will be observed that the last of the p — 1 congruences included in the 

 congruence 



(x—l)(x—2)(x—3) (x— p — 1) = xp~ 1 — I, modp 



(which is a particular case of that last written), namely the congruence 



1.2.3 .. .p— 1 = — l,mod/> 



is the symbolic expression of Sir J. Wilson's Theorem. 



1 1. Lagrange's Limit of the Number of Roots of a Congruence. — The full 

 development of the consequences of Fermat's Theorem requires the aid of the 

 following proposition, which was first given, in a slightly different form, by 

 Lagrange*. 



" If F (x) be a function of x of n di mensions, such that F (a) = 0, mod p, 

 then a function of a: of n — 1 dimensions, F, (x), can always be assigned such 

 that we shall have the identical congruence F (a-) eeh (x—a) F T (x), mod p." 



Hence we may infer that no congruence, of which the modulus is prime, 

 can have more incongruous roots than it has dimensions; and, if a con- 

 gruence have congruous roots, we obtain a definition of their multiplicity ; 

 viz., if F (#) = (x— a) r F, (x), mod p, then we may say that F (x) = 0, mod p, 

 has r roots congruous to a. We may also observe that this theorem enables 

 us at once to infer Lagrange's indeterminate congruence from the first ex- 

 pression of Fermat's Theorem. For since xp~ 1 — 1 is •=() for the values 

 a?=l, .r = 2, ....x^p — 1, we may, by successive applications of the pre- 

 ceding theorem, show that xP~ l — 1 =(x— 1) (x— 2) ....(x—p + l),modp. 



1 2. Theory of the Residues ofPoivers. — The principal elementary theorems 

 relating to the Residues of Powers are the following. They are all due to 



* Nouvelle Methode pour resoudre les Problemes Indeteriuines en Nombres entiers. 

 (See Hist. Ac. Berl. 1768, p. 192.) The case of binomial congruences of the form x" = 1 had 

 already been treated by Eulcr. (See Nov. Comment. Petropol. vol. xviii. p. 85, or Comment. 

 Arith. vol. i. p. 510, art. 28 of the Memoir.) 



