# Repeating decimal

Short description: Decimal representation of a number whose digits are periodic

A repeating decimal or recurring decimal is decimal representation of a number whose digits are periodic (repeating its values at regular intervals) and the infinitely repeated portion is not zero. It can be shown that a number is rational if and only if its decimal representation is repeating or terminating (i.e. all except finitely many digits are zero). For example, the decimal representation of 1/3 becomes periodic just after the decimal point, repeating the single digit "3" forever, i.e. 0.333.... A more complicated example is 3227/555, whose decimal becomes periodic at the second digit following the decimal point and then repeats the sequence "144" forever, i.e. 5.8144144144.... At present, there is no single universally accepted notation or phrasing for repeating decimals.

The infinitely repeated digit sequence is called the repetend or reptend. If the repetend is a zero, this decimal representation is called a terminating decimal rather than a repeating decimal, since the zeros can be omitted and the decimal terminates before these zeros. Every terminating decimal representation can be written as a decimal fraction, a fraction whose denominator is a power of 10 (e.g. 1.585 = 1585/1000); it may also be written as a ratio of the form k/2n5m (e.g. 1.585 = 317/2352). However, every number with a terminating decimal representation also trivially has a second, alternative representation as a repeating decimal whose repetend is the digit 9. This is obtained by decreasing the final (rightmost) non-zero digit by one and appending a repetend of 9. Two examples of this are 1.000... = 0.999... and 1.585000... = 1.584999.... (This type of repeating decimal can be obtained by long division if one uses a modified form of the usual division algorithm.)

Any number that cannot be expressed as a ratio of two integers is said to be irrational. Their decimal representation neither terminates nor infinitely repeats, but extends forever without repetition (see § Every rational number is either a terminating or repeating decimal). Examples of such irrational numbers are 2 and π.

## Background

### Notation

There are several notational conventions for representing repeating decimals. None of them are accepted universally.

Different notations with examples
Fraction Vinculum Dots Parentheses Arc Ellipsis
1/9 0.1 0. 0.(1) 0.111...
1/3 = 3/9 0.3 0. 0.(3) 0.333...
2/3 = 6/9 0.6 0. 0.(6) 0.666...
9/11 = 81/99 0.81 0. 0.(81) 0.8181...
7/12 = 525/900 0.583 0.58 0.58(3) 0.58333...
1/7 = 142857/999999 0.142857 0.4285 0.(142857) 0.142857142857...
1/81 = 12345679/999999999 0.012345679 0.1234567 0.(012345679) 0.012345679012345679...
22/7 = 3142854/999999 3.142857 3.4285 3.(142857) 3.142857142857...
• Vinculum: In the United States , Canada , India , France , Germany , Italy, Switzerland , the Czech Republic, Slovakia, Slovenia, and Turkey the convention is to draw a horizontal line (a vinculum) above the repetend. (See examples in table above, column Vinculum.)
• Dots: In the United Kingdom , New Zealand, Australia , India , South Korea , and China , the convention is to place dots above the outermost numerals of the repetend. (See examples in table above, column Dots.)
• Parentheses: In parts of Europe, Vietnam and Russia , the convention is to enclose the repetend in parentheses. (See examples in table above, column Parentheses.) This can cause confusion with the notation for standard uncertainty.
• Arc: In Spain and some Latin American countries, the arc notation over the repetend is also used as an alternative to the vinculum and the dots notation. (See examples in table above, column Arc.)
• Ellipsis: Informally, repeating decimals are often represented by an ellipsis (three periods, 0.333...), especially when the previous notational conventions are first taught in school. This notation introduces uncertainty as to which digits should be repeated and even whether repetition is occurring at all, since such ellipses are also employed for irrational numbers; π, for example, can be represented as 3.14159....

In English, there are various ways to read repeating decimals aloud. For example, 1.234 may be read "one point two repeating three four", "one point two repeated three four", "one point two recurring three four", "one point two repetend three four" or "one point two into infinity three four".

### 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.0675675675.....

### Every rational number is either a terminating or repeating decimal

For any given divisor, 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. Then the length of the repetend, also called "period", is defined to be 0.

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. The repeating sequence of digits is called "repetend" which has a certain length greater than 0, also called "period".

### 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.

## Table of values

• Script error: No such module "Vertical header". decimal
expansion
10 binary
expansion
2
1/2 0.5 0 0.1 0
1/3 0.3 1 0.01 2
1/4 0.25 0 0.01 0
1/5 0.2 0 0.0011 4
1/6 0.16 1 0.001 2
1/7 0.142857 6 0.001 3
1/8 0.125 0 0.001 0
1/9 0.1 1 0.000111 6
1/10 0.1 0 0.00011 4
1/11 0.09 2 0.0001011101 10
1/12 0.083 1 0.0001 2
1/13 0.076923 6 0.000100111011 12
1/14 0.0714285 6 0.0001 3
1/15 0.06 1 0.0001 4
1/16 0.0625 0 0.0001 0
• Script error: No such module "Vertical header". decimal
expansion
10
1/17 0.0588235294117647 16
1/18 0.05 1
1/19 0.052631578947368421 18
1/20 0.05 0
1/21 0.047619 6
1/22 0.045 2
1/23 0.0434782608695652173913 22
1/24 0.0416 1
1/25 0.04 0
1/26 0.0384615 6
1/27 0.037 3
1/28 0.03571428 6
1/29 0.0344827586206896551724137931 28
1/30 0.03 1
1/31 0.032258064516129 15
• Script error: No such module "Vertical header". decimal
expansion
10
1/32 0.03125 0
1/33 0.03 2
1/34 0.02941176470588235 16
1/35 0.0285714 6
1/36 0.027 1
1/37 0.027 3
1/38 0.0263157894736842105 18
1/39 0.025641 6
1/40 0.025 0
1/41 0.02439 5
1/42 0.0238095 6
1/43 0.023255813953488372093 21
1/44 0.0227 2
1/45 0.02 1
1/46 0.02173913043478260869565 22
1/47 0.0212765957446808510638297872340425531914893617 46
• Thereby fraction is the unit fraction 1/n and 10 is the length of the (decimal) repetend.

The lengths 10(n) of the decimal repetends of 1/n, n = 1, 2, 3, ..., are:

0, 0, 1, 0, 0, 1, 6, 0, 1, 0, 2, 1, 6, 6, 1, 0, 16, 1, 18, 0, 6, 2, 22, 1, 0, 6, 3, 6, 28, 1, 15, 0, 2, 16, 6, 1, 3, 18, 6, 0, 5, 6, 21, 2, 1, 22, 46, 1, 42, 0, 16, 6, 13, 3, 2, 6, 18, 28, 58, 1, 60, 15, 6, 0, 6, 2, 33, 16, 22, 6, 35, 1, 8, 3, 1, 18, 6, 6, 13, 0, 9, 5, 41, 6, 16, 21, 28, 2, 44, 1, 6, 22, 15, 46, 18, 1, 96, 42, 2, 0... (sequence A051626 in the OEIS).

For comparison, the lengths 2(n) of the binary repetends of the fractions 1/n, n = 1, 2, 3, ..., are:

0, 0, 2, 0, 4, 2, 3, 0, 6, 4, 10, 2, 12, 3, 4, 0, 8, 6, 18, 4, 6, 10, 11, 2, 20, 12, 18, 3, 28, 4, 5, 0, 10, 8, 12, 6, 36, 18, 12, 4, 20, 6, 14, 10, 12, 11, ... (=A007733[n], if n not a power of 2 else =0).

The decimal repetends of 1/n, n = 1, 2, 3, ..., are:

0, 0, 3, 0, 0, 6, 142857, 0, 1, 0, 09, 3, 076923, 714285, 6, 0, 0588235294117647, 5, 052631578947368421, 0, 047619, 45, 0434782608695652173913, 6, 0, 384615, 037, 571428, 0344827586206896551724137931, 3, 032258064516129, 0, 03, 2941176470588235, 285714... (sequence A036275 in the OEIS).

The decimal repetend lengths of 1/p, p = 2, 3, 5, ... (nth prime), are:

0, 1, 0, 6, 2, 6, 16, 18, 22, 28, 15, 3, 5, 21, 46, 13, 58, 60, 33, 35, 8, 13, 41, 44, 96, 4, 34, 53, 108, 112, 42, 130, 8, 46, 148, 75, 78, 81, 166, 43, 178, 180, 95, 192, 98, 99, 30, 222, 113, 228, 232, 7, 30, 50, 256, 262, 268, 5, 69, 28, 141, 146, 153, 155, 312, 79... (sequence A002371 in the OEIS).

The least primes p for which 1/p has decimal repetend length n, n = 1, 2, 3, ..., are:

3, 11, 37, 101, 41, 7, 239, 73, 333667, 9091, 21649, 9901, 53, 909091, 31, 17, 2071723, 19, 1111111111111111111, 3541, 43, 23, 11111111111111111111111, 99990001, 21401, 859, 757, 29, 3191, 211, 2791, 353, 67, 103, 71, 999999000001, 2028119, 909090909090909091, 900900900900990990990991, 1676321, 83, 127, 173... (sequence A007138 in the OEIS).

The least primes p for which k/p has n different cycles (1 ≤ kp−1), n = 1, 2, 3, ..., are:

7, 3, 103, 53, 11, 79, 211, 41, 73, 281, 353, 37, 2393, 449, 3061, 1889, 137, 2467, 16189, 641, 3109, 4973, 11087, 1321, 101, 7151, 7669, 757, 38629, 1231, 49663, 12289, 859, 239, 27581, 9613, 18131, 13757, 33931... (sequence A054471 in the OEIS).