## Monday Math 82

Consider writing a proper fraction (a positive rational number less than 1), in lowest terms, as a decimal. As many people learn in their mathematics education, there are three possible outcomes:
I). Terminating Decimal
One has a finite sequence of digits after the decimal point (followed by a non-written infinite sequence of zeroes).
Examples: 1/2=0.5, 1/8=0.125, 1/200=0.005
II). Pure Repeating Decimal
One has a finite sequence of digits which repeats infinitely many times after the decimal point.
Examples: 1/3=0.333333…, 1/7=0.142857142857…, 1/33=0.03030303…
III). Mixed Repeating Decimal
One has a finite sequence of non-repeating digits followed by infinite repeats of a different digit sequence.
Examples: 1/6=0.166666…, 1/22=0.0454545…, 43/180=0.23888888…

How do we determine which of these a given fraction will have without performing the division to actually compute the result? Let’s first examine the terminating decimals.
The digits of a decimal represent multiples of negative powers of 10. For our examples:
0.5=(5/10)=1/2, 0.125=(1/10)+(2/100)+(5/1000)=125/1000=1/8, and 0.005=(0/10)+(0/100)+(5/1000)=5/1000=1/200.
So we see the common denominator of the fractions represented by the digits of the decimal is that of the rightmost digit; if we have n digits, the common denominator is 10n. Thus, the denominator of our fraction must divide this power of 10: 2|10, 8|1000, 200|1000. In fact, we see that 10n is the smallest power of 10 which is divisible by our fraction denominator.
From this, we then obtain the condition for a fraction to give a terminating decimal: there must be a power of 10 divisible by the denominator of the fraction (in lowest terms). This occurs only if the denominator’s prime factors are 2 and/or 5: 2=2, 8=23, 200=23*52. Note that the highest power of 2 and/or 5 in the prime factorization of the denominator is the number of digits n

Examination of the prime factorizations of the denominators of pure repeating decimals versus mixed repeating decimals will give us the distinguishing element:
the denominators of fractions that give pure repeating decimals are coprime with 10; they are divisible by neither 2 nor 5. For the mixed repeating decimals, the denominator is divisible by 2 and/or 5, but the prime factorization also contains other primes. From our examples:
6=2*3, 22=2*11, 180=22*32*5.

Note that for the mixed repeating decimals, the fraction denominators can be factored into the product of a number which divides a power of 10 and a number coprime with 10. For example 6=2*3, 22=2*11, 180=20*9. If we call the number which divides the power of 10 a and the number coprime with 10 b then our mixed repeating decimal has as many non-repeating digits as the terminating decimal 1/a and a repeated sequence of the same length as the repeated sequence of 1/b:
1/6: 1/2=0.5 has one digit, 1/3=0.333… has a one-digit repeat, so 1/6=0.16666 has one non-repeating digit and one repeating.
1/22: 1/2=0.5 has one digit, 1/11=0.090909… has a two-digit repeat, so 1/22=0.0454545 has one non-repeating digit and two repeating.
43/180: 1/20=0.05 has two digits, 1/9=0.1111… has a one-digit repeat, so 43/180=0.23888… has two non-repeating digits and one repeating.