User talk:Ling Kah Jai/Phenomenon of repeating decimal

Latest comment: 10 years ago by A math-wiki

I managed to stumble across this page via a google search and found the material interesting and familiar. I've done some original research of my own w/ repeating decimals and discovered a rather interesting theory that explains, rather completely, their behavior in any base (choice of base matters, as you probably know).

I was curious as to why 1/7=.(142857)... and k/7 for 0<k<7 were all that same 6-digit reptend, just started in a different place. Things were even more interesting with 1/13=.(076923)... but 2/13=.(153846)... all k/13 where just one of these two 6-digit reptends started in a different place. Here we have two sets of 6 numerators which each lead to the same 6-digit reptend starting in different places, and the two sets combined given all 12 (natural number) numerators k that satisfy 0<k<13. This behavior holds in general for arbitrary primes p coprime to the base b. They partition the numerators into a sets of b where b is the prime's reptend length and a*b=p-1. The explanation for this ties into algebraic number theory and cyclotomic polynomials. As you seemed to have noticed, the least natural number k such that p divides b^k-1 evenly is the reptend length of p in base b. There is another observation that is important. If you examine the arithmetic that you would do in computing 1/p in base b (for simplicity, use b=10 at first and perhaps small p, like 7 or 13, to keep the period short but long enough for the pattern to emerge) you will observe that as soon as the remainder is 1, the next step matches the very first step (because the the numerator is 1, if a different numerator is used look for that numerator to occur again). Furthermore no the remainders repeat just like the decimal (but with different values). The simple, but important observation here is: There are only p-1 distinct numerators for k/p such that 0<k/p<1, therefore, the maximum (full) reptend length is p-1.

This basically gives a proof of Fermat's little theorem, which states b^(p-1) is congruent to 1 mod p. Or said a bit differently, p divides b^(p-1)-1 evenly. b^(p-1)-1 is a difference of (p-1)-st powers, which can be factored in a fairly straightforward manner. since p divided b^(p-1)-1, it must divide one of it's factors. It's factors are the mth cyclotomic polynomials, where m divides p-1. The precious m which p divides into evenly is the reptend length of p in base b. This is just the beginning, armed with this result, and the much easier to derive result for when p is a factor of b, one can completely describe how 1/n behaves in base b for any natural number n. It's behavior is the following: If it shares any factors w/ b, then it will have a unique, non-repeated segment of digits whose length is the least power c of b, such that the product of the non-coprime factors of n divides b^c. If it has any coprime factors, then it will have a repeated reptend that follows the unique segment which will have a length given by the least common multiple of the reptends of p^k for each p coprime to be that is a factor of n where k is the power of that prime factor p in the prime factorization of n. The one interesting caveat about p^k is that it's period requires some additional work to establish, an example that shows why is p=3 in base 10, which has reptend length 1. p^2=9 also has this reptend length in base 10, but p^3=27 has reptend length 3 (p times reptend length of p^2). Once you find the least k such that p^k has reptend length exceeding p^(k-1) (it will always have reptend length p*[reptend length of p^(k-1)), each successive power of p will have reptend length p times the previous power of p.

The last interesting thing I discovered was a way to figure out the reptend length of a given prime p in EVERY base. You examine each cyclotomic polynomial which is a factor of b^(p-1)-1 and solve the given polynomial in the finite field modulo p, that is for m(x) the mth cyclotomic polynomial (where m divides p-1), solve m(x) congruent to 0 modulo p.

Hope you found that interesting, I discovered it a few years ago while I was an Undergraduate student at Portland State University (I live within driving distance of the university), still not sure if any of that is actually new to mathematics or not, I've found much of it in the literature, but some pieces, especially that last result I haven't be able to find yet (admittedly I haven't searched all that much). A math-wiki (talk) 09:39, 27 September 2014 (UTC)Reply