CHAP. II] CHINESE PROBLEM OF REMAINDERS. 63 



Then n = \P + N + nQ + MiQi + ^2 + , where X is any integer. 

 The first of the above set of equations has an infinitude of solutions if Q 

 and MI are relatively prime, but no solution in the contrary case unless 

 Ni N be divisible by the g.c.d. of Q, MI. 



Lagrange 107 noted that the problem is to make Mi + N, MIU + NI, 

 MIX + Nz, equal. The general value of i making the first two equal 

 is i = Ar + Mim, where A = NI N, r is fixed and m is arbitrary. The 

 next step is to solve 



M(Ar + Mim) + N = M 2 x + N 2 

 for m, x] etc. 



K. F. Hindenburg 108 gave a method of "cyclic periods" to find, for 

 example, a number x having the remainders 1 and 2 when divided by a = 2 

 and j8 = 3. The numbers 1, 2, , a are written in a column and repeated 

 )8 times; similarly 1, 2, -,/? are written in a second column and repeated 

 a tunes. The given remainders appear in the 5th row; hence x 5. 



1 1 



2 2 



1 3 



2 1 



1 2 



2 3 



C. F. Gauss, 109 to find z with the remainders a and 6 when divided by 

 A and B, solved z Ax + a = 6 (mod B), obtaining x = v (mod J5/6), 

 if 6 is the g.c.d. of A, B. Hence z = Av + a (mod M} is the complete 

 solution of the problem, where M = AB/d is the l.c.m. of A, B. If we add 

 the condition that z = c (mod C), we get the complete solution 



z = Mw + Av + a (mod M'), 



where M' = ABC/de is the l.c.m. of A, B, C, while is the g.c.d. of M, C. 



We may replace z = a (mod A} by z = a (mod A'), 2 = a (mod A"), 

 -, where A'A" - = A and A', A", are powers of distinct primes. 

 Similarly, let B = B'B" -. In case B' p r , A' = p 8 , r ^ s, the problem 

 is impossible unless b = a (mod A'), while if this is satisfied the condition 

 z = a (mod A') may be dropped. In this way we can derive an equivalent 

 set of congruences in which the moduli are relatively prime in pairs and 

 proceed as above or as in Gauss 76 [due to Euler 96 ^. 



A. D. Wheeler 110 noted that the least integer k which has the given 

 remainders r, r', - when divided by the given numbers d, d', - is found 

 by reducing (x r)jd, (x r')/d', to equivalent fractions with a 



107 Mem. Acad. Roy. Sc. Berlin, 24, ann<e 1768 (1770), 222; Oeuvres, II, 698. 



108 Leipziger Magazin reine u. angewandte Math., 1786, 281-324; extr. by Lorentz, Lehrbegriff 



der Math., ed. 2, I, 406-442, and by C. A. W. Berkhan, Lehrbuch der Unbestimmten 

 Analytik, Halle, 1, 1855, 124-144. 



109 Disq. Arith., 1801, arts. 32-5; Werke, I, 1863, 23-6; Maser's German transl., 15-18. 



110 The Math. Monthly (ed., Runkle), New York, 2, 1860, 410. 



