340 HISTORY OF THE THEOBY OF NUMBERS. [CHAP.XU not multiples of p. Application is made to the primes p^37. Again, if p is a prime and where k, k', k" are prime to p, then AB2-\-CB+D is divisible by p provided k'2 — kk" is a multiple of p. C. F. M oiler and C. Holten24 would test the divisibility of n by a given prime p by seeking a such that ap===± 1 (mod 10) and subtracting from n such a multiple of ap that the difference ends with zero. L. L. Hommel25 made remarks on the preceding method. V. Schlegel26 noted that if the divisor to be tested ends with 1, 3, 7 or 9, its product by 1, 7, 3 or 9 is of the form d= 10X+1. Then a, with the final digit u, is divisible by d if ax == (a — ud)/10 is. Then treat a! as we did a, etc. P. Otto27 would test Z for a given prime factor p by seeking a number n such that if the product by n of the number formed by the last s digits of Z be subtracted from the number represented by the remaining digits, the remainder is divisible by p if and only if Z is. Material is tabulated for the application of the method when p<100. N. V. Bougaief 27a noted that ap . . . <LI to base B is divisible by D if 0,1 . . . aM to base d is divisible by D, where dB= 1 (mod D) . For B = 10 and D = 10n+9, 1, 3, 7, we may take d = n+l, 9n+l, 3n'+l, 7n+5, respectively. Again, kB2 -\-aB-\-b is divisible by D if kB+a+bd is divisible. W. Mantel and G. A. Oskamp28 proved that, to test the divisibility of a number to any base by a prime, the value of the coefficient required to eliminate one, two, . . . digits on subtraction is periodic. Also the number of terms of the period equals the length of the period of the periodic fraction arising on division by the same prime. G. Dostor280 noted that 10£+ u is divisible by any divisor a of lOA^ 1 if t=FAu is divisible by a. [A case of Liljevalch120.] Hocevar29 noted that if N, written to base a, is separated into groups GI, G2, . . . each of q digits, N is divisible by a factor of afi+l if GI — G2+G3 - ... is divisible. Thus, for a = 2, g = 4, JV= 104533, or 11001100001010101 to base 2 is divisible by 17 since 0101-0101 + 1000-1001 + 1 = 0. J. Delboeuf30 stated that if p, q are such that pa-\-qb is a multiple of D and if N = Aa+Bp is a multiple of D = aa+6/5, then pA -}-qB is a multiple of D. E. Catalan (ibid., p. 508) stated and proved the preceding test in the following form: If a, b and also a', bf are relatively prime, and then AAf+BBf is a multiple of N (and a sum of 2 squares if N is). "Tidsskrift for Math., (3\ 5, 1875, 177-180. 25Tidsskrift for Math., (3), 6, 1876, 15-19. 26Zeitschrift Math. Phys., 21, 1876, 365-6. 27Zeitschrift Math. Phys., 21, 1876, 366-370. 27aMat. Sbornik (Math. Soc. Moscow), 8, 1876, I, 501-5. 28Nieuw Archief voor Wiskunde, Amsterdam, 4, 1878, 57-9, 83-94. 2*"Archiv Math. Phys., 63, 1879, 221-4. 29Zur Lehre von der Teilbarkeit. . ., Prog. Innsbruck, 1881. 30La Revue Scientifiaue de France. (3). 38. 1886. 377-8.