Repeating decimal

In arithmetic, repeating decimal is a way of representing a rational number. Thus, a decimal representation of a number is called a repeating decimal (or recurring decimal) if at some point it becomes periodic, that is, if there is some finite sequence of digits that is repeated indefinitely. For example, the decimal representation of 1/3 = 0.3333333… or 0.3 (spoken as "0.3 repeating", or "0.3 recurring") becomes periodic just after the decimal point, repeating the single-digit sequence "3" infinitely. A somewhat more complicated example is 3227/555 = 5.8144144144…, where the decimal representation becomes periodic at the second digit after the decimal point, repeating the sequence of digits "144" indefinitely.

Rational numbers are numbers that can be expressed in the form a/b where a and b are integers and b is non-zero. This form is known as a common fraction. On the one hand, the decimal representation of a rational number is ultimately periodic, as explained below. On the other hand every real number which as an eventually periodic decimal expansion is a rational number. In other words the numbers with eventually repeating decimal expansions are exactly the rational numbers.

A decimal representation written with a repeating final 0 is said to terminate before these zeros. Instead of "1.585000…" one simply writes "1.585".[1] The decimal is also called a terminating decimal. Terminating decimals represent rational numbers of the form k/(2n5m). For example, 1.585 = 317/200 = 317/(2352). A terminating decimal can be written as a decimal fraction: 317/200 = 1585/1000. However, a terminating decimal also has a second representation as a repeating decimal, obtained by decreasing the final (nonzero) digit by one and appending an infinitely repeating sequence of nines, a phenomenon students typically find puzzling (see List of common misconceptions#Mathematics). 1 = 0.999999… and 1.585 = 1.584999999… are two examples of this. This type of repeating decimal can be obtained by long division if one uses a modified form of the usual division algorithm.[2]

A decimal that is neither terminating nor repeating represents an irrational number (which cannot be expressed as a fraction of two integers), such as the square root of 2 or the number π. Conversely, an irrational number always has a non-repeating decimal representation.

Contents

Background

Notation

One convention to indicate a repeating decimal is to put a horizontal line (known as a vinculum) above the repeated numerals (\tfrac{1}{3}=0.\overline{3}). Another convention is to place dots above the outermost numerals of the repeating digits. Where these methods are impossible, the extension may be represented by an ellipsis (…), although this may introduce uncertainty as to exactly which digits should be repeated. Another notation, used for example in Europe and China, encloses the repeating digits in brackets.

Fraction Ellipsis Vinculum Dots Brackets
1/9 0.111… 0.1 0.\dot{1} 0.(1)
1/3 0.333… 0.3 0.\dot{3} 0.(3)
2/3 0.666… 0.6 0.\dot{6} 0.(6)
9/11 0.8181… 0.81 0.\dot{8}\dot{1} 0.(81)
7/12 0.58333… 0.583 0.58\dot{3} 0.58(3)
1/81 0.012345679… 0.012345679 0.\dot{0}1234567\dot{9} 0.(012345679)
22/7 3.142857142857… 3.142857 3.\dot{1}4285\dot{7} 3.(142857)

Decimal expansion and recurrence sequence

In order to convert a rational number represented as a fraction into decimal form, one may use long division. For example, consider the rational number 5/74:

        0.0675
   74 ) 5.00000
        4.44
          560
          518
           420
           370
            500

etc. Observe that at each step we have a remainder; the successive remainders displayed above are 56, 42, 50. When we arrive at 50 as the remainder, and bring down the "0", we find ourselves dividing 500 by 74, which is the same problem we began with. Therefore the decimal repeats: 0.0675 675 675 ….

Every rational number is either a terminating or repeating decimal

Only finitely many different remainders can occur. In the example above, the 74 possible remainders are 0, 1, 2, …, 73. If at any point in the division the remainder is 0, the expansion terminates at that point. If 0 never occurs as a remainder, then the division process continues forever, and eventually a remainder must occur that has occurred before. The next step in the division will yield the same new digit in the quotient, and the same new remainder, as the previous time the remainder was the same. Therefore the following division will repeat the same results.

Every repeating or terminating decimal is a rational number

Each repeating decimal number satisfies a linear equation with integer coefficients, and its unique solution is a rational number. To illustrate the latter point, the number α = 5.8144144144… above satisfies the equation 10000α − 10α = 58144.144144… − 58.144144… = 58086, whose solution is α = 58086/9990 = 3227/555.. The process of how to find these integer coefficients is described below.

Fractions with prime denominators

A fraction in lowest terms with a prime denominator other than 2 or 5 (i.e. coprime to 10) always produces a repeating decimal. The period of the repeating decimal of 1/p is equal to the order of 10 modulo p. If 10 is a primitive root modulo p, the period is equal to p − 1; if not, the period is a factor of p − 1. This result can be deduced from Fermat's little theorem, which states that 10p−1 = 1 (mod p).

The base-10 repetend (the repeating decimal part) of the reciprocal of any prime number greater than 5 is divisible by 9.[3]

Cyclic numbers

If the period of the repeating decimal of 1/p for prime p is equal to p − 1 then the repeating decimal part is called a cyclic number.

Examples of fractions belonging to this group are:

The list can go on to include the fractions 1/47, 1/59, 1/61, 1/109, etc.

Every proper multiple of a cyclic number (that is, a multiple having the same number of digits) is a rotation.

See also the article 142857 for more properties.

Other reciprocals of primes

Some reciprocals of primes that do not generate cyclic numbers are:

The multiples of 1/13 can be divided into two sets, with different repeating decimal parts. The first set is:

where the repeating decimal part of each fraction is a cyclic re-arrangement of 076923. The second set is:

where the repeating decimal part of each fraction is a cyclic re-arrangement of 153846.

In general, the set of reciprocals of a prime p will consist of n sets each with period k, where nk = p − 1.

Reciprocals of composite integers coprime to 10

If p is a prime other than 2 or 5, the decimal representation of the fraction \tfrac{1}{p^2} has a specific period e.g.:

1/49 = 0.0204081 6326530 6122448 9795918 3673469 3877551

The period of the repeating decimal must be a factor of λ(49) = 42, where λ(n) is known as the Carmichael function. This follows from Carmichael's theorem, which states that: if n is a positive integer then λ(n) is the smallest integer m such that

a^m \equiv 1 \pmod{n}

for every integer a that is coprime to n.

The period of the repeating decimal of \tfrac{1}{p^2} is usually pTp where Tp is the period of the repeating decimal of \tfrac{1}{p}. There are three known primes for which this is not true, and for which the period of \tfrac{1}{p^2} is the same as the period of \tfrac{1}{p} because p2 divides 10p−1−1; they are 3, 487 and 56598313 (sequence A045616 in OEIS).[4]

Similarly, the period of the repeating decimal of \tfrac{1}{p^k} is usually pk−1Tp

If p and q are primes other than 2 or 5, the decimal representation of the fraction \tfrac{1}{p \ q} has a specific period. An example is 1/119:

119 = 7 × 17
λ(7 × 17) = LCM(λ(7), λ(17))
= LCM(6, 16)
= 48

where LCM denotes the least common multiple.

The period T of \tfrac{1}{p \ q} is a factor of λ(pq) and it happens to be 48 in this case:

1/119 = 0.00840336 13445378 15126050 42016806 72268907 56302521

The period T of the repeating decimal of \tfrac{1}{p \ q} is LCM(TpTq) where Tp is the period of the repeating decimal of \tfrac{1}{p} and Tq is the period of the repeating decimal of \tfrac{1}{q}.

If p , q, r etc. are primes other than 2 or 5, and k , , m etc. are positive integers then \frac{1}{p^k q^\ell r^m \cdots } is a repeating decimal with a period of \mathrm{LCM}(T_{p^k}, T_{q^\ell}, T_{r^m}, \ldots) where T_{p^k},\ T_{q^\ell},\ T_{r^m}, etc. are respectively the periods of the repeating decimals \frac{1}{p^k},\ \frac{1}{q^\ell},\ \frac{1}{r^m},\ etc. as defined above.

Reciprocals of integers not co-prime to 10

An integer that is not co-prime to 10 but has a prime factor other than 2 or 5 has a reciprocal that is eventually periodic, but with a non-repeating sequence of digits that precede the repeating part. The reciprocal can be expressed as:

\frac{1}{2^a 5^b p^k q^\ell \cdots}\, ,

where a and b are not both zero.

This fraction can also be expressed as:

\frac{5^{a-b}}{10^a p^k q^\ell \cdots}\, ,

if a > b, or as

\frac{2^{b-a}}{10^b p^k q^\ell \cdots}\, ,

if b > a, or as

\frac{1}{10^a p^k q^\ell \cdots}\, ,

if a = b.

The decimal has:

For example 1/28 = 0.03571428571428…:

Converting repeating decimals to fractions

Given a repeating decimal, it is possible to calculate the fraction that produced it. For example:

\begin{alignat}2
   x &= 0.333333\ldots\\
 10x &= 3.333333\ldots&\quad&\text{(multiplying each side of the above line by 10)}\\
  9x &= 3          &&\text{(subtracting the 1st line from the 2nd)}\\
   x &= 3/9 = 1/3   &&\text{(reducing to lowest terms)}\\
\end{alignat}

Another example:

\begin{align}
    x &=   0.836363636\ldots\\
  10x &= 8.3636363636\ldots\text{(multiplying by a power of 10 to move decimal to start of repetition)}\\
1000x &= 836.36363636\ldots\text{(multiplying by a power of 10 to move decimal to end of first repeating decimal)}\\
 990x &= 836 - 8 = 828 \text{   (subtracting to clear decimals)}\\
    x &= \frac{828}{990} = \frac{18 \times 46}{18 \times 55} = \frac{46}{55}.
\end{align}

A shortcut

The above argument can be applied in particular if the repeating sequence has n digits, all of which are 0 except the final one which is 1. For instance for n = 7:

\begin{align}
    x &=   0.000000100000010000001\ldots \\
 10^7x &= 1.000000100000010000001\ldots \\
  (10^7-1)x=9999999x &= 1 \\
    x &= {1 \over 10^7-1} = {1 \over9999999}
\end{align}

So this particular repeating decimal corresponds to the fraction 1/(10n − 1), where the denominator is the number written as n digits 9. Knowing just that, a general repeating decimal can be expressed as a fraction without having to solve an equation. For example, one could reason:


\begin{align}
7.48181818\ldots & = 7.3 %2B 0.18181818\ldots \\[8pt]
& = \frac{73}{10}%2B\frac{18}{99} = \frac{73}{10} %2B \frac{9\times2}{9\times 11}
= \frac{73}{10} %2B \frac{2}{11} \\[12pt]
& = \frac{11\times73 %2B 10\times2}{10\times 11} = \frac{823}{110}
\end{align}

It is possible to get a general formula expressing a repeating decimal with an n digit period, beginning right after the decimal point, as a fraction:

x = 0.(A1A2An)

10nx = A1A2An.(A1A2An)

(10n - 1)x = 99…99x = A1A2An

x = A1A2An/(10n - 1)

= A1A2An/99…99

More explicitly one gets the following cases.

If the repeating decimal is between 0 and 1, and the repeating block is n digits long, first occurring right after the decimal point, then the fraction (not necessarily reduced) will be the integer number represented by the n-digit block divided by the one represented by n digits 9. For example,

If the repeating decimal is as above, except that there are k (extra) digits 0 between the decimal point and the repeating n-digit block, then one can simply add k digits 0 after the n digits 9 of the denominator (and as before the fraction may subsequently be simplified). For example,

Any repeating decimal not of the form described above can be written as a sum of a terminating decimal and a repeating decimal of one of the two above types (actually the first type suffices, but that could require the terminating decimal to be negative). For example,

It follows that any repeating decimal with period n, and k digits after the decimal point that do not belong to the repeating part, can be written as a (not necessarily reduced) fraction whose denominator is (10n − 1)10k.

Conversely the period of the repeating decimal of a fraction c/d will be (at most) the smallest number n such that 10n − 1 is divisible by d.

For example, the fraction 2/7 has d = 7, and the smallest k that makes 10k − 1 divisible by 7 is k = 6, because 999999 = 7 × 142857. The period of the fraction 2/7 is therefore 6.

Repeating decimals as an infinite series

Repeating decimals can also be expressed as an infinite series. That is, repeating decimals can be shown to be a sum of a sequence of numbers. To take the simplest example,

\sum_{n=1}^\infty \frac{1}{10^n} = {1 \over 10} %2B {1 \over 100} %2B {1 \over 1000} %2B \cdots = 0.\overline{1}

The above series is a geometric series with the first term as 1/10 and the common factor 1/10. Because the absolute value of the common factor is less than 1, we can say that the geometric series converges and find the exact value in the form of a fraction by using the following formula where a is the first term of the series and r is the common factor.

\ \frac{a}{1-r} = \frac{\frac{1}{10}}{1-\frac{1}{10}} = \frac{1}{9} = 0.\overline{1}

Multiplication and cyclic permutation

The cyclic behavior of repeating decimals in multiplication also leads to the construction of integers which are cyclically permuted when multiplied by a number n. For example, 102564 x 4 = 410256. Note that 102564 is the repeating digits of 4/39 and 410256 the repeating digits of 16/39.

Other properties of repetend lengths

Various properties of repetend lengths (periods) are given in [5] and [6]:

The period of 1/k for integer k is always ≤ k − 1.

If p is prime, the period of 1/p divides evenly into p − 1.

If k is composite, the period of 1/k is strictly less than k − 1.

The period of c/k, for c coprime to k, equals the period of 1/k.

If k=2^{a}5^{b}n where n > 1 and n is not divisible by 2 or 5, then the length of the transient of 1/k is max(ab), and the period equals r, where r is the smallest integer such that 10^r \equiv 1 \pmod n.

If p, p', p", … are distinct primes, then the period of 1/(pp'p"…) equals the lowest common multiple of the periods of 1/p, 1/p' ,1/p" , ….

If k and k' have no common prime factors other than 2 and/or 5, then the period of \frac{1}{kk'} equals the least common multiple of the periods of \frac{1}{k} and \frac{1}{k'}.

For prime p, if \text{period of } \tfrac{1}{p}= \text{period of }\tfrac{1}{p^{2}}= \cdots = \text{period }\tfrac{1}{p^m} but \text{period of }\tfrac{1}{p^{m%2B1}} \ne \text{ period of } \tfrac {1}{p}, then for  c \ge m we have \text{period of } \tfrac{1}{p^{c}} = p^{c-m} \cdot \text{ period of } \tfrac{1}{p}.

If p is a proper prime ending in a 1 – that is, if the repetend of 1/p is a cyclic number of length p − 1 and p = 10h + 1 for some h – then each digit 0, 1, …, 9 appears in the repetend exactly h = (p − 1)/10 times.

For some other properties of repetends, see also[7].

See also

References

  1. ^ Courant, R. and Robbins, H. What Is Mathematics?: An Elementary Approach to Ideas and Methods, 2nd ed. Oxford, England: Oxford University Press, 1996: p. 67 .
  2. ^ Beswick, Kim (2004), "Why Does 0.999... = 1?: A Perennial Question and Number Sense", Australian Mathematics Teacher 60 (4): 7-9 
  3. ^ Gray, Alexander J., "Digital roots and reciprocals of primes," Mathematical Gazette 84, March 2000, 86.
  4. ^ Albert H. Beiler, Recreations in the Theory of Numbers, p 79
  5. ^ Mitchell, Douglas W., "A nonlinear random number generator with known, long cycle length," Cryptologia 17, January 1993, 55–62.
  6. ^ Dickson, Leonard E., History of the Theory of Numbers, Vol. I, Chelsea Publ. Co., 1952 (orig. 1918), 164–173.
  7. ^ Armstrong, N. J., and Armstrong, R. J., "Some properties of repetends," Mathematical Gazette 87, November 2003, 437–443.

External links