Thoughts on 1/7 and other rational numbers (Part 6)

In Part 5 of this series, I showed that fractions of the form \displaystyle \frac{M}{10^d}, \displaystyle \frac{M}{10^k - 1}, and \displaystyle \frac{M}{10^d (10^k-1)} can be converted into their decimal representations without using long division and without using a calculator.

The amazing thing is that every rational number \displaystyle \frac{a}{b} can be written in one of these three forms. Therefore, after this conversion is made, then the decimal expansion can be found without a calculator.

green line

Case 1. If the denominator b has a prime factorization of the form 2^m 5^n, then \displaystyle \frac{a}{b} can be rewritten in the form \displaystyle \frac{M}{10^d}, where d = \max(m,n).

For example,

\displaystyle \frac{3}{160} = \displaystyle \frac{3}{2^5 \times 5}

\displaystyle \frac{3}{160} = \displaystyle \frac{3}{2^5 \times 5} \times \frac{5^4}{5^4}

\displaystyle \frac{3}{160} = \displaystyle \frac{3 \times 5^4}{2^5 \times 5^5}

\displaystyle \frac{3}{160} = \displaystyle \frac{1875}{10^5}

\displaystyle \frac{3}{160} = 0.01875

The step of multiplying both sides by \displaystyle \frac{5^4}{5^4} is perhaps unusual, since we’re so accustomed to converting fractions into lowest terms and not making the numerators and denominators larger. This particular form of 1 was chosen in order to get a power of 10 in the denominator, thus facilitating the construction of the decimal expansion.

green line

Case 2. If the denominator b is neither a multiple of 2 nor 5, then  \displaystyle \frac{a}{b} can be rewritten in the form \displaystyle \frac{M}{10^k - 1}.

For example,

\displaystyle \frac{3}{11} = \displaystyle \frac{3}{11} \times \frac{9}{9}

\displaystyle \frac{3}{11} = \displaystyle \frac{27}{99}

\displaystyle \frac{3}{11} = 0.\overline{27}

This example wasn’t too difficult since we knew that 9 \times 11 = 99. However, finding the smallest value of k that works can be a difficult task requiring laborious trial and error.

However, we do have a couple of theorems that can assist in finding k. First, since k is the length of the repeating block, we are guaranteed that k must be less than the denominator b since, using ordinary long division, the length of the repeating block is determined by how many steps are required until we get a remainder that was seen before.

However, we can do even better than that. Using ideas from number theory, it can be proven that k must be a factor of \phi(b), which is the Euler toitent function or the number of integers less than b that are relatively prime with b. In the example above, the denominator was 11, and clearly, if 1 \le n < 11, then \gcd(n,11) = 1. Since there are 10 such numbers, we know that k must be a factor of 10. In other words, k must be either 1, 2, 5, or 10, thus considerably reducing the amount of guessing and checking that has to be done. (Of course, for the example above, k=2 was the least value of k that worked.)

In general, if n = p_1^{a_1} p_2^{a_2} \dots p_r^{a_r} is the prime factorization of n, then

\phi(n) = n \left( \displaystyle 1 - \frac{1}{p_1} \right) \left( \displaystyle 1 - \frac{1}{p_2} \right) \dots \left( \displaystyle 1 - \frac{1}{p_r} \right)

For the example above, since 11 was prime, we have \phi(11) = 11 \left( \displaystyle 1 - \frac{1}{11} \right) = 10.

green line

Case 3. Suppose the prime factorization of the denominator b both (1) contains 2 and/or 5 and also (2) another prime other than 2 and 5. This is a mixture of Cases 1 and 2, and the fraction \displaystyle \frac{a}{b} can be rewritten in the form \displaystyle \frac{M}{10^d (10^k-1)}.

For example, consider

\displaystyle \frac{11}{74} = \displaystyle \frac{11}{2 \times 37}

Following the rule for Case 1, we should multiply by \displaystyle \frac{5}{5} to get a 10 in the denominator:

\displaystyle \frac{11}{74} = \displaystyle \frac{11}{2 \times 37} \times \frac{5}{5} = \frac{55}{10 \times 37}

Next, we need to multiply 37 by something to get a number of the form 10^k - 1. Since 37 is prime, every number less than 37 is relatively prime with 37, so \phi(37) = 36. Therefore, k must be a factor of 36. So, k must be one of 1, 2, 3, 4, 6, 9, 12, 18, and 36.

(Parenthetically, while we’ve still got some work to do, it’s still pretty impressive that — without doing any real work — we can reduce the choices of k to these nine numbers. In that sense, the use of \phi(n) parallels how the Rational Root Test is used to determine possible roots of polynomials with integer coefficients.)

So let’s try to find the least value of k that works.

  • If k = 1, then 10^1 - 1 = 9, but 9 \div 37 is not an integer.
  • If k = 2, then 10^2 - 1 = 99, but 99 \div 37 is not an integer.
  • If k = 3, then 10^3 - 1 = 999, and it turns out that 999 \div 37 = 27, an integer.

Therefore,

\displaystyle \frac{11}{74} = \frac{55}{10 \times 37} \times \frac{27}{27}

\displaystyle \frac{11}{74} = \frac{1485}{10 \times 999}

\displaystyle \frac{11}{74} = \frac{999 + 486}{10 \times 999}

\displaystyle \frac{11}{74} = \frac{999}{10 \times 999}+ \frac{486}{10 \times 999}

\displaystyle \frac{11}{74} = \frac{1}{10}+ \frac{486}{10 \times 999}

\displaystyle \frac{11}{74} = 0.1 + 0.0\overline{486}

\displaystyle \frac{11}{74} = 0.1\overline{486}

Thoughts on 1/7 and other rational numbers (Part 5)

Students are quite accustomed to obtaining the decimal expansion of a fraction by using a calculator. Here’s an (uncommonly, I think) taught technique for converting certain fractions into a decimal expansion without using long division and without using a calculator. I’ve taught this technique to college students who want to be future high school teachers for several years, and it never fails to surprise.

First off, it’s easy to divide any number by a power of 10, or 10^k. For example,

\displaystyle \frac{4312}{1000} = 4.312 and \displaystyle \frac{71}{10000} = 0.00071

What’s less commonly known is that it’s also easy to divide by 10^k - 1, or 99\dots 9, a numeral with k consecutive 9s. (This number can be used to prove the divisibility rules for 3 and 9 and is also the subject of one of my best math jokes.) The rule can be illustrated with a calculator:

TI999

In other words, if M < 10^k - 1, then the decimal expansion of \displaystyle \frac{M}{10^k-1} is a repeating block of k digits containing the numeral M, possibly adding enough zeroes to fill all k digits.

To prove that this actually works, we notice that

\displaystyle \frac{M}{10^k - 1} = M \times \frac{ \displaystyle \frac{1}{10^k}}{\quad \displaystyle 1 - \frac{1}{10^k} \quad}

 \displaystyle \frac{M}{10^k - 1} = M \times \left(\displaystyle \frac{1}{10^k} + \frac{1}{10^{2k}} + \frac{1}{10^{3k}} + \dots \right)

\displaystyle \frac{M}{10^k-1} = M \times 0.\overline{00\dots01}

The first line is obtained by multiplying the numerator and denominator by \displaystyle \frac{1}{10^k}. The second line is obtained by using the formula for an infinite geometric series in reverse, so that the first term is \displaystyle \frac{1}{10^k} and the common ratio is also \displaystyle \frac{1}{10^k}. The third line is obtained by converting the series — including only powers of 10 — into a decimal expansion.

If M > 10^k - 1, then the division algorithm must be used to get a numerator that is less than 10^k-1. Fortunately, dividing big numbers by 10^k-1 is quite easy and can be done without a calculator. For example, let’s find the decimal expansion of \displaystyle \frac{123456}{9999} without a calculator. First,

123456 = 12(10000) + 3456

123456 = 12(9999 + 1) + 3456

123456 = 12(9999) + 12(1) + 3456

123456 = 12(9999) + 3468

Therefore,

\displaystyle \frac{123456}{9999} = \displaystyle \frac{12(9999) + 3468}{9999}

\displaystyle \frac{123456}{9999} = \displaystyle \frac{12(9999)}{9999} + \frac{3468}{9999}

\displaystyle \frac{123456}{9999} = \displaystyle 12 + \frac{3468}{9999}

\displaystyle \frac{123456}{9999} = \displaystyle 12.\overline{3468}

This can be confirmed with a calculator. Notice that the repeating block doesn’t quite match the digits of the numerator because of the intermediate step of applying the division algorithm.

TI9999

green line

In the same vein, it’s also straightforward to find the decimal expansion of fractions of the form \displaystyle \frac{M}{10^d (10^k-1)}, so that the denominator has the form 99\dots9900\dots00. This is especially easy if M < 10^k -1. For example,

\displaystyle \frac{123}{99900} = \frac{1}{100} \times \frac{123}{999} = \frac{1}{100} \times 0.\overline{123} = 0.00\overline{123}

On the other hand, if M > 10^k-1, then the division algorithm must be applied as before. For example, let’s find the decimal expansion of \displaystyle \frac{51237}{99000}. To begin, we need to divide the numerator by 99, as before. Notice that, for this example, an extra iteration of the division algorithm is needed to get a remainder less than 99.

51237 = 512(100) + 37

51237 = 512(99 + 1) + 37

51237 = 512(99) + 512 + 37

51237 = 512(99) + 549

51237= 512(99) + 5(100) + 49

51237 = 512(99) + 5(99 + 1) + 49

51237 = 512(99) + 5(99) + 5 + 49

51237 = 517(99) + 54

Therefore,

\displaystyle \frac{51237}{99000} = \displaystyle \frac{517(99) + 54}{99000}

\displaystyle \frac{51237}{99000} = \displaystyle \frac{517(99)}{99000} + \frac{54}{99000}

\displaystyle \frac{51237}{99000} = \displaystyle \frac{517}{1000} + \frac{54}{99000}

\displaystyle \frac{51237}{99000} = 0.517 + 0.000\overline{54}

\displaystyle \frac{51237}{99000} = 0.517\overline{54}

In particular, notice that the three 0s in the denominator correspond to a delay of length 3 (the digits 517), while the 99 = 10^2 - 1 in the denominator corresponds to the repeating block of length 2.

These can be confirmed for students who may be reluctant to believe that decimal expansions can be found without a calculator.

TI99000