Prove: if a rational number has a repeating decimal and the denominator is not divisible by 3 then the block of digits that repeats, taken as a decimal, is divisible by 9.
Examples:
7/13 = .538461 538461 538461 ...
538461 = 9*59829
15/22 = .6 81 81 81 ...
81 = 9*9
Let .cdddddd... = a/b
where a and b are integers of any length,
c is an integer of length n (where n might be 0)
d is an integer of length m (where m > 1)
For instance, if a/b = 15/22, then c = 6 and d = 81, n = 1 and m = 2.
Multiply by b*(10^n)
Then a*(10^n) = bc + b*(.ddddddd...) = bc + bd/((10^m)-1).
(That last step is done by treating each d as a term in a geometric series which is 1/(10^m) times the previous term.)
a*(10^n) is an integer, and so is bc, so bd/((10^m)-1) must be an integer also. Note that 10^m - 1 is divisible by 9 for all values of m > 1. If b is not divisible by 3, then in order to make the whole thing an integer it follows necessarily that d is divisible by 9.
q.e.d.
p.s. -- It follows, contrapositively, that if d is not a multiple of 9, then b is a multiple of 3.
Edited on March 24, 2013, 10:10 am