A decimal representation of a real number is called a repeating decimal (or recurring decimal) if at some point it becomes periodic: there is some finite sequence of digits that is repeated indefinitely. For example, the decimal representation of 13 = 0.3333333... (spoken as "0.3 repeating") becomes periodic just after the decimal point, repeating the single-digit sequence "3" infinitely. A somewhat more complicated example is 3227555 = 5.8144144144..., where the decimal representation becomes periodic at the second digit after the decimal point, repeating the sequence of digits "144" infinitely.

A real number has an ultimately periodic decimal representation if and only if it is a rational number. Rational numbers are numbers that can be expressed in the form ab where a and b are integers and b is non-zero. This form is known as a vulgar fraction. On the one hand, the decimal representation of a rational number is ultimately periodic because it can be determined by a long division process, which must ultimately become periodic as there are only finitely many different remainders and so eventually it will find a remainder that has occurred before. On the other hand, each repeating decimal number satisfies a linear equation with integral 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 α = 580869990 = 3227555.

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 k2n5m. For example, 1.585 = 317200 = 3172352. A terminating decimal can be written as a decimal fraction: 317200 = 15851000. However, a terminating decimal also has a representation as a repeating decimal, obtained by decreasing the final (nonzero) digit by one and appending an infinitely repeating sequence of nines. 1 = 0.999999... and 1.585 = 1.584999999... are two examples of this.

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-terminating non-repeating decimal representation.

Background

Notation

One convention to indicate a repeating decimal is to put a horizontal line (known as a vinculum) above the repeated numerals (). 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
19 0.111... 0.1 0.(1)
13 0.333... 0.3 0.(3)
23 0.666... 0.6 0.(6)
17 0.142857142857... 0.142857 0.(142857)
181 0.012345679... 0.012345679 0.(012345679)
712 0.58333... 0.583 0.58(3)

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 574:

        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.

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 1p 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).

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

Cyclic numbers

Main article: Cyclic number

Examples of fractions belonging to this group are:

The list can go on to include the fractions 147, 159, 161, 197, 1109, etc.

The following multiplications exhibit an interesting property (see more of these similar features on the 142857 article):

That is, these multiples can be obtained from rotating the digits of the original decimal of 17. Thus the number 142857 is called a cyclic number. The reason for the cyclic behavior is apparent from an arithmetic exercise of long division of 17: the sequential remainders are the cyclic sequence {1, 3, 2, 6, 4, 5}.

Other reciprocals of primes

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

The multiples of 113 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.

Reciprocals of composite integers coprime to 10

If p is prime other than 2 and 5, the decimal representation of the fraction 1p2 has a specific period e.g.:

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

for every integer a that is coprime to n.

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

Similarly, the period of the repeating decimal of 1 / pk is usually pk−1Tp

If p and q are primes other than 2 or 5, the decimal representation of the fraction has a specific period. An example is 1119:

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

where LCM denotes the least common multiple

The period T of is a factor of λ(pq) and it happens to be 48 in this case:

The period T of the repeating decimal of is LCM(TpTq) where

Tp is the period of the repeating decimal of 1p
Tq is the period of the repeating decimal of 1q

If p , q, r and etc are primes other than 2 or 5, and k , , m etc. are positive integers then

is a repeating decimal with a period of LCM

where , etc are respectively the periods of the repeating decimals:

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:

where a and b are not both zero.

This fraction can also be expressed as:

if a > b, or as

if b > a, or as

if a = b.

The decimal has:

For example 128 = 0.03571428571428...:

Converting repeating decimals to fractions

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

Failed to parse (unknown function "\begin{alignat}"): {\displaystyle \begin{alignat}2 x &= 0.333333\ldots\\ 10x &= 3.333333\ldots&\quad&\mbox{(multiplying each side of the above line by 10)}\\ 9x &= 3 &&\mbox{(subtracting the 1st line from the 2nd)}\\ x &= 3/9 = 1/3 &&\mbox{(simplifying)}\\ \end{alignat))

Another example:

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:

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:

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 cd will be (at most) the smallest number n such that 10n − 1 is divisible by d.

For example, the fraction 27 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 27 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,

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.


Multiplication and cyclic permutation

Main article: Cyclic permutation of integer

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 439 and 410256 the repeating digits of 1639.

See also

Notes

  1. ^ Page 67 of Courant, R. and Robbins, H. What Is Mathematics?: An Elementary Approach to Ideas and Methods, 2nd ed. Oxford, England: Oxford University Press, pp. 66–68, 1996.
  2. ^ Albert H. Beiler, Recreations in the Theory of Numbers, p 79