But if we divide the terms of the series m, ma, ma², ma³, &c. by b, m being less than b, we have cycles of remainders beginning with m. If 1, r, s, t, &c. be the first set of remainders, then the second set is the set of remainders arising from m, mr, ms, mt, &c. If 1 never occur in the first set before aᵇ⁻¹ (except at the beginning), then all the numbers under b-1 inclusive are found among the set 1, r, s, t, &c.; and if m be prime to b ([Prop. 4]), all the same numbers are found, in a different order, among the remainders of m, mr, &c. But should it happen that the set 1, r, s, t, &c. is not complete, then m, mr, ms, &c. may give a different set of remainders.
All these last theorems are constantly verified in the process for reducing a fraction to a decimal fraction. If m be prime to b, or the fraction m/b in its lowest terms, the process involves the successive division of m, m × 10, m × 10², &c. by b. This process can never come to an end unless some power of 10, say 10ⁿ, is divisible by b; which cannot be, if b contain any prime factors except 2 and 5. In every other case the quotient repeats itself, the repeating part sometimes commencing from the first figure, sometimes from a later figure. Thus, ¹/₇ yields ·142857142857, &c., but ¹/₁₄ gives ·07(142857)(142857), &c., and ¹/₂₈ gives ·03(571428)(571428), &c.
In m/b, the quotient always repeats from the very beginning whenever b is a prime number and m is less than b; and the number of figures in the repeating part is then always b-1, or a measure of it. That it must be so, appears from the above propositions.
Before proceeding farther, we write down the repeating part of a quotient, with the remainders which are left after the several figures are formed. Let the fraction be ¹/₁₇, we have
0₁₀5₁₅8₁₄8₄2₆3₉5₅2₁₆9₇4₂1₃1₁₃7₁₁6₈4₁₂7₁
This may be read thus: 10 by 17, quotient 0, remainder 10; 10² by 17, quotient 05, remainder 15; 10³ by 17, quotient 058, remainder 14; and so on. It thus appears that 10¹⁶ by 17 leaves a remainder 1, which is according to the theorem.
If we multiply 0588, &c. by any number under 17, the same cycle is obtained with a different beginning. Thus, if we multiply by 13, we have
7647058823529411
beginning with what comes after remainder 13 in the first number. If we multiply by 7, we have 4117, &c. The reason is obvious: ¹/₁₇ × 13, or ¹³/₁₇, when turned into a decimal fraction, starts with the divisor 130, and we proceed just as we do in forming ¹/₁₇, when within four figures of the close of the cycle.
It will also be seen, that in the last half of the cycle the quotient figures are complements to 9 of those in the first half, and that the remainders are complements to 17. Thus, in 0₁₀5₁₅8₁₄8₄, &c. and 9₇4₂1₃1₁₃, &c. we see 0 + 9 = 9, 5 + 4 = 9, 8 + 1 = 9, &c., and 10 + 7 = 17, 15 + 2 = 17, 14 + 3 = 17, &c. We may shew the necessity of this as follows: If the remainder 1 never occur till we come to use aᵇ⁻¹, then, b being prime, b-1 is even; let it be 2k. Accordingly, a²ᵏ-1 is divisible by b; but this is the product of aᵏ-1 and aᵏ + 1, one of which must be divisible by b. It cannot be aᵏ - 1, for then a power of a preceding the (b - 1)th would leave remainder 1, which is not the case in our instance: it must then be aᵏ + 1, so that aᵏ divided by b leaves a remainder b-1; and the kth step concludes the first half of the process. Accordingly, in our instance, we see, b being 17 and a being 10, that remainder 16 occurs at the 8th step of the process. At the next step, the remainder is that yielded by 10(b-1), or 9b + b - 10, which gives the remainder b-10. But the first remainder of all was 10, and 10 + (b - 10) = b. If ever this complemental character occur in any step, it must continue, which we shew as follows: Let r be a remainder, and b - r a subsequent remainder, the sum being b. At the next step after the first remainder, we divide 10r by b, and, at the next step after the second remainder, we divide 10b - 10r by b. Now, since the sum of 10r and 10b - 10r is divisible by b, the two remainders from these new steps must be such as added together will give b, and so on; and the quotients added together must give 9, for the sum of the remainders 10r and 10b - 10r yields a quotient 10, of which the two remainders give 1.