User:Ling Kah Jai/Phenomenon of repeating decimal

Cyclic permutation
Cyclic permutation may refer to:
 * the process when an integer is cyclically permuted to another integer; or
 * the latter integer, which is permuted from the former integer.

The plural form, cyclic permutations, always refer to the latter.

Cyclic behavior – the phenomenon
Convert $1/F$ to a decimal and trim the rear decimal places which repeat. Then convert the result to an integer C1 by removing the decimal point. Transform $2/F$, $3/F$, ..., $(F-1)/F$ similarly to integers C2, C3, ..., CF-1. Cyclic behavior refers to the property that these integers Ci consist of either a set or multiple sets of cyclic permutations.

The cyclic behaviors of various decimals from the reciprocals of different types of integers are summarized below:

It is concluded that only reciprocals of integers, which are not coprime to 10, do not convert to repeating decimals that possess cyclic behavior. The above summary and expression of cyclic behavior constitutes the phenomenon of repeating decimals.

Group theory or modular mathematics equivalent
There is a group theory equivalent for cyclic behavior.

If {G, *} is a group where * is multiplication modulo F (also see multiplicative group of integers modulo F, and modular arithmetic), then G = {1, 2, 3, ..., F - 1}.

The multiplication 10 modulo F will either be generate group or subgroup of G and may also be cyclic:

In this manner, the cyclic behavior has an equivalent in group theory, i.e. the operation will ... to be continued.

Corollary 1
The phenomenon leads to Corollary 1, which expresses cyclic behavior in another format:
 * An integer F coprime to 10 has a reciprocal that can be expressed as a repeating decimal. If the repeating digit of $1/F$ is C, then:
 * the cyclic permutations of C can be generated by adding C repeatedly.
 * For any positive integer  Ri less than F the cyclic permutations of the repeating digits of $R_{i}/F$, if they are not in the same set of cyclic permutations as C, can also be achieved by adding C repeatedly.

A numerical example is shown below:

The integer 015873 is the repeating digits of $1/63$. Its cyclic permutations are:
 * 158730, 587301, 873015, 730158, 301587;
 * which are represented by $10/63$, $37/63$, $55/63$, $46/63$, and $19/63$ respectively.

These cyclic permutations are all multiples of 015873 and can be generated from the integer 015873 by adding 15873 or 142857 (which is 9&times;15873) repeatedly.

Corollary 2
The second corollary of the phenomenon relates to highest common factors:


 * The highest common factor (HCF) between any cyclic permutation of an integer and the 9-repdigit having the same number of digits is always the same. Expressed in formula, the corollary is:
 * HCF(N, 9-repdigit) = HCF(Nc, 9-repdigit)
 * where N is any integer; and Nc is any cyclic permutation of N'';
 * 9-repdigit = 10m - 1 ; and
 * m is the number of digits of N.

For examples, HCF(123456, 999999) = HCF(2^6*3*643, 3^3*7*11*13*37) = 3                       = HCF(234561, 999999) = HCF(345612, 999999) = HCF(456123, 999999) = HCF(561234, 999999) = HCF(612345, 999999) HCF(153846, 999999) = HCF(2^3^3*7*11*37,3^3*7*11*13*37) = 76923                       = HCF(538461, 999999) = HCF(384615, 999999) = HCF(846153, 999999) = HCF(461538, 999999) = HCF(615384, 999999)

Replacing 1523846 by 076923, we obtain the same results.

This corollary can be generalized to a number system in any base:
 * HCF(Na, am - 1) = HCF(a cyclic permutation of Na, am - 1);
 * where m is any positive integer; and Na is any integer having m digits in base a numeral system.

Proof of Corollary 2
The proof is given here for base 10 numeral system but equally applies to any bases.

Every integer, C1, when added with a decimal point in front and concatenated with itself infinite times, converts to a fraction. E.g. the integer 123456 is transformed in this manner to 0.123456123456..., which can then be converted to the fraction $123456/999999$. Any cyclic permutation, Ci of C1 can be converted to a fraction in a similarly manner.

Expressed in fractions, the cyclic permutations are:
 * where 9-repdigit = (10m - 1).
 * where 9-repdigit = (10m - 1).

From the phenomenon of repeating decimal, any cyclic permutation Ci can be generated from C1 by:
 * the operation &times;10 (mod (10m - 1)); or
 * repeating the same operation multiple times.

Since 10 is coprime to (10m - 1), thus if
 * C1 = r (mod p)

then
 * Ci = r (mod p)
 * where r is a non-negative integer; and p is:
 * a prime factor of the (10m - 1); or
 * a product of any number of prime factors of (10m - 1).

Thus if
 * C1 = 0 (mod p)

then
 * Ci = 0 (mod p)

This proves that C1 shares a same factor p with Ci whereas p has been defined above; and thus completes the proof.

Alternative Writing To Proof Of Corollary 2
The highest common factor (HCF) between any cyclic permutation of an integer and the 9-repdigit having the same number of digits is constant. Expressed in formula:
 * HCF(j, 9-repdigit) = HCF(k, 9-repdigit)
 * where j is any integer; and k is any cyclic permutation of k;
 * 9-repdigit = 10m - 1 ; and
 * m is the number of digits of j.

For examples, HCF(091575, 999999) = HCF(3^2*5^2*11*37, 3^3*7*11*13*37) = 3663                       = HCF(915750, 999999) = HCF(157509, 999999) = HCF(575091, 999999) = HCF(750915, 999999) = HCF(509157, 999999)

If $j$ is a six-digit integer, its next cyclic permutation $k$ can be obtained from:
 * $$k = 10 j - 999999 n$$
 * Where $n$ is the first digit of $j$

Example 157509 = 915750&times;10 - 9&times;999999.

This explains the above common HCF, the phenomenon of which is true in any base if the 9-repdigit is replaced by (am - 1), where a is the base and m is the number of digits.

The cyclic permutations are thus related to repeating decimals and the corresponding fractions. For examples the related fractions to the above cyclic permutations are thus: Reduced to their lowest term, they are:
 * $C_{1}/9-repdigit$, $C_{2}/9-repdigit$, $C_{3}/9-repdigit$, $C_{m}/9-repdigit$, $091575/999999$, and $915750/999999$.
 * $157509/999999$, $575091/999999$, $750915/999999$, $509157/999999$, $25/273$, and $250/273$.

That is, these fractions when expressed in the lowest terms, have the same denominator. This is true for cyclic permutations of any integer.

Some specific integers permute or shift cyclically when they are multiplied by a number n. Examples are:


 * 142857 &times; 3 = 428571 (shifts cyclically one place left)
 * 142857 &times; 5 = 714285 (shifts cyclically one place right)
 * 128205 &times; 4 = 512820 (shifts cyclically one place right)
 * 076923 &times; 9 = 692307 (shifts cyclically two places left)

These specific integers can be but are not always cyclic numbers. The characterization of such numbers can be done using repeating decimals (and thus the related fractions), or directly.

Corollary 3
Corollary 2 also leads to the following:
 * Every set of cyclic permutations of an integer, when converted to repeating decimal by adding a decimal point in front and concatenating itself infinite number of times, can be expressed as a series of fractions. When the fractions are expressed in the lowest terms, the numerators are integers and the denominators are the same integer.

For examples,
 * Cyclic permutations 123456, 234561, 345612, 456123, 561234 and 612345 are the repeating digits of the fractions $43/273$, $157/273$, $205/273$, $139/273$, $41152/333333$, $78187/333333$ in the lowest terms.


 * Cyclic permutations 012345679, 123456790, 234567901, 345679012, 456790123, 567901234, 679012345, 790123456, and 901234567 are the repeating digits of the fractions $115204/333333$, $152041/333333$, $187078/333333$, $204115/333333$, $1/81$, $10/81$, $19/81$, $28/81$, and $37/81$ in the lowest terms.

Adding or subtracting cyclic permutations by repdigit
Subtract 1-repdigit from (or add 1-repdigit to) each element of a set of cyclic permutations, and if necessary add (or subtract) 9-repdigit in order for all the results to be within the positive range between 0 and 9-repdigit. The operation produces a second set of cyclic permutations.

Replace 1-repdigit by n-repdigit, where n is a integer between 2 and 9, different sets of cyclic permutations are produced.

The consequence (operation on a set of cyclic permutations results in another set of cyclic operations) is obvious if we perform the same operation on their repeating decimal equivalents, not fractions, of a few cyclic permutations and compare the results. For example, compare the following two additions (reduce by 1 if the result is bigger than 1): 0.142857 142857 142857...                0.428571 428571 428571... + 0.666666666666666666...      with     + 0.666666666666666666....

Adding or subtracting two sets of cyclic permutations
Arrange two sets of cyclic permutations in the proper cyclic order (each set does not need to start from the smallest number). Then add (or subtract) every element of the second set to (from) the first set, and if necessary subtract (or add) 9-repdigit in order for all the results to be within the positive range between 0 and 9-repdigit. The operation produces a third set of cyclic permutations.

Again such consequence is obvious if we perform the same operation on their repeating decimal equivalents, not fractions, of a few cyclic permutations and compare the results. For example, compare the following two additions (reduce by 1 if the result is bigger than 1): 0.076923 076923 076923...                0.769230 769230 769230... + 0.142857142857142857...      with     + 0.428571428571428571....

From this perspective, the previous feature is also covered here as the set of cyclic permutations for 111111 is no other than {111111, 111111, 111111, 111111, 111111, 111111}.

The table below shows the above operation in terms of equivalent fractions. Subtract the result by 1 if it is greater than 1.

The rule, in the form of modular mathematics, can be deduced from these fraction equivalents:


 * Given:
 * Two integers F1 and F2 are coprime to each other;
 * The operation &times;10 (mod F1) on an integer R1 generates a set of integers {R1, R2, ..., Rn};
 * The operation &times;10 (mod F2) on another integer S1 generates a set of integers {S1, S2, ..., Sn}; and
 * The two sets of integers have the same number of elements;
 * T1 = F2 R1 + F1 S1;
 * Then the operation &times;10 (mod F1 F2) on T1 shall generate {T1, T2, ..., Ti, ..., Tn}, where Ti = F2 Ri + F1 Si

Every cyclic number is characterized by the reciprocal of a reptend prime
We have learnt that the repeating digits of the reciprocal of a full reptend prime form a cyclic number. We shall also prove the reverse:


 * A cyclic number C typically has m number of digits and produces m cyclic permutations when multiplied by numbers 1 to m.


 * From Corollary 1, C and its cyclic permutations can be represented by the repeating digits of $46/81$, $55/81$, $64/81$, ..., $73/81$; where F is coprime to 10. All integers i, which can be any value from 1 to m, can be generated from 1 by repeating the operation &times;10 (mod F). The integer F can only be a full reptend prime in order for such generation to be correct, and and m shall be (F - 1). This can also be deduced from group theory. Arithmetic check can be performed to illustrate this, e.g.,


 * For F = 7, apply the operation &times;10 (mod 7) on 1 repeatedly produces {1, 3, 2, 6, 4, 5}, which is a series of rearranged consecutive numbers between 1 and m = 6; where F = 7 = a full reptend prime;
 * For F = 11, apply the operation &times;10 (mod 11) on 1 repeatedly produces {1, 10}, which is not a series of rearranged consecutive numbers;
 * For F = 13, apply the operation &times;10 (mod 13) repeatedly produces {1, 10, 9, 12, 3, 4} which is not a series of rearranged consecutive numbers;

This completes the proof.

This means there are no cyclic numbers besides those generated from full reptend primes. One of the consequences is: other than 142857, there are no cyclic numbers smaller than 0588235294117647 for base 10 numeral system.