User:Ling Kah Jai/Repeating decimal buffer

Proof of Corollary 2 - alternative
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$.

Thus every integer C1 can be represented by the fraction $C_{1}/9-repunit$. Reduce the fraction to its lowest terms by dividing both the numerator and denominator by the HCF between them, say its now $R_{1}/F$.Obviously F is a factor of 9-repunit. Corollary 1 then says that all cyclic permutations of C1 can be obtained from $R_{i}/F$ for a selected set of integers Ri. Given that Ri is generated from repeating the operation &times;10 (mod F) for a number of time, then R1, Ri and F shall not share a common factor in accordance with modular mathematics. This complete the proof, which also leads to Corollary 3.

buffer
Problem: A number X shift right cyclically by double positions when it is multiplied with n = 4. Find X.

Solution: First recognize that the X is the repeating digits of a repeating decimal, which always possesses some interesting cyclic behavior in multiplications. Number X and its multiple then will have the following relationship:


 * The number X is the repeating digits of the fraction $1/F$, say cdxxx...ab, where a, b, c, d each represents a digit and x represents an unknown digit.
 * The multiple is thus the repeating digits of the fraction $4/F$, say abcdxxx....
 * If the first remainder is taken to be 4, then 1 shall be the third remainder in the long division for $4/F$, in order for the cyclic permutation to take place. Thus $F$ shall be 399 so that this will happen: 4 &times; 102 &divide; 399 gives remainder 1.

This yields the results that:


 * X = the repeating digits of $1/399$
 * =0025062656 64160401, and
 * the multiple = 0025062656 64160401 &times; 4 = 01002506265 6641604

Generally the above deduce that $F$ = n &times; 102 - 1; and X is the repeating digits of $1/F$.

Left shift by double positions
Problem: A number X shift left cyclically by double positions when it is multiplied with 2. Find X.

Solution: First recognize that X is the repeating digits of a repeating decimal, which always possesses some interesting cyclic behavior in multiplications. Number X and its multiple then will have the following relationship:


 * The number X is the repeating digits of the fraction $1/F$, say abcdxxx....
 * The multiple is thus the the repeating digits of the fraction $3/F$, say cdxxx...ab.
 * If the first remainder is taken to be 1 then 2 shall be the third remainder in the long division for $1/F$ in order for this cyclic permutation to take place. Thus $F$ shall be a factor of (102 - 2) = 98 in order that 1 &times; 2 &divide; $F$ gives remainder 2. The smallest F that fits this purpose is 7, giving X = 142857.

Generally the above deduces that $F$ is $R$ = 102 - n, or a factor of $R$; and X is the repeating digits of $1/F$.