ON THE THEORY OF NUMBERS. 231 



solution of a congruence involves no theoretical difficulty. For if #=« be a 

 solution, every number included in the formula x=a + /xP is also a solution, 

 and among these numbers there is always one, and only one, comprised 

 within the limits and P— 1 inclusively. By substituting, therefore, for x all 

 numbers in succession less than the modulus, and rejecting those which do 

 not satisfy the congruence, we shall obtain its complete solution. But the 

 interminable labour attending this operation, notwithstanding all the abbre- 

 viations in it suggested by the Calculus of Finite Differences, renders its 

 application impossible, except when the modulus is a low number. 



6. Systems of Residues The set of numbers 0, 1,2....P— 1 (or any 



set of P numbers respectively congruous for the modulus P to those numbers) 

 is termed a, complete system of residues for the modulus P. By a system of 

 residues prime to P, we are to understand a complete system, from which 

 every residue has been omitted which has any common divisor with P. Thus 

 1, 5, 7, 11, or 1, 5, —5, —1, are the terms of a system of residues prime to 

 12. The word Residue is employed instead of Remainder, because the 

 word Remainder would suggest the idea of a positive number less than the 

 modulus or divisor ; whereas it is frequently convenient to consider residues 

 differing from those positive remainders by any multiples of the modulus 

 whatever. 



7. Linear Congruences. — The general form of a linear congruence is 

 ax+b~0, modP; a, b, and P denoting given numbers, and a; a number to be 

 determined. 



The theory of these congruences may be considered to be complete, both 

 as regards the determination of the solutions or roots themselves and of their 

 number. If a be prime to the modulus, there is always one solution, and one 

 only ; if a have a common divisor with the modulus which does not also divide 

 b, the congruence is irresoluble ; if d be the greatest common divisor of a and 

 P, and if $ also divide b, the congruence has 2 solutions. In every case when 

 the congruence is resoluble, the direct determination of its roots may be made 

 to depend on the solution of a congruence of the form ax=l, mod P, in which 

 a is prime to P. This congruence coincides with the indeterminate equation 

 ax=\-\-Yy, methods for the solution of which were known to the ancient 

 Indian geometers*, and have been given in Europe by Bachet de Meziriacf 

 Euler J, and Lagrange §. The methods of these writers ultimately depend 

 on the conversion of a vulgar fraction into a continued fraction, and in one 

 form or another have passed into every book on algebra. Nor would it have 

 been proper to allude to them here, were it not that they serve to supply us 

 with a clear conception of what we have a right to expect in the solution of 

 an arithmetical problem. In such problems, we cannot expect to express 

 the qucesita as (discontinuous) analytical functions of the data. Such ex- 

 pressions may indeed, in many cases, be obtained (by the use of the roots of 

 unity or by other methods) ; but the results of the kind which have hitherto 

 been given, though sometimes of use in calculation, may be said, with few 

 exceptions, to conceal rather than to express the real connexion between the 



* See the Arithmetic of Bhascara, cap. xii., and the Algebra of Brahmegupta, cap. i. in 

 Mr. Colebrooke's translation, London, 1817. 



t Problemes plaisans et delectables, qui se font par les nombres. Seconde edition. Par 

 Claude Gaspar Bachet, Sieur de Meziriac, Lyon, 1624. (See props, xv. to xxv.) 



\ Comment. Acad. Petropol. torn. vii. p. 46, or in the Collection of Euler's Arithmetical 

 Memoirs (L. Euleri Commentationes Arithmeticae Collectse, Petropoli, 1849), vol. i. p. 2 ; 

 and in his Elements of Algebra, part ii. cap. 1 . 



§ Sur la Resolution des Problcmes Indetermincs du seconde degre. Hist, de 1' Acad, 

 de Berlin, 1767, p. 165. (See Arts 7, 8, and 29 of the Memoir.) Also in the Additions to 

 Euler's Algebra, sects, i. and ill. (Lyon, an. in.) 



