How do you calculate/prove the length of n, the number of non-repeating digits preceeding a periodic sequence of a fractional repeating decimal - MathOverflow most recent 30 from http://mathoverflow.net2013-05-19T11:18:35Zhttp://mathoverflow.net/feeds/question/41736http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://mathoverflow.net/questions/41736/how-do-you-calculate-prove-the-length-of-n-the-number-of-non-repeating-digits-prHow do you calculate/prove the length of n, the number of non-repeating digits preceeding a periodic sequence of a fractional repeating decimalunknown (google)2010-10-11T01:49:13Z2010-10-11T02:53:40Z
<p>Is there a way to calculate the number of non-repeating digits that precede the periodic repeating portion of a decimal expansion? For example:</p>
<p>1/6 = 0.1666.... (there is 1 non repeating digit) **(Correction)
1/12 = 0.08333... (there are 2 non repeating digits)
7/12 = 0.58333....(there are 2 non repeating digits)
1/96 = 0.01041666..(there are 5 non repeating digits)</p>
<p>Do any forumulas exist for predicting the maximum length n, of the number of non repeating digits preceding the repeating portion? </p>
<p>I know that if the denominator of a fraction is n, the maximum length of the repeating periodic portion is n-1. Must also the length of the preceding portion before the cycle be n-1?</p>
<p>Thank you! </p>
http://mathoverflow.net/questions/41736/how-do-you-calculate-prove-the-length-of-n-the-number-of-non-repeating-digits-pr/41743#41743Answer by Nick S for How do you calculate/prove the length of n, the number of non-repeating digits preceeding a periodic sequence of a fractional repeating decimalNick S2010-10-11T02:53:40Z2010-10-11T02:53:40Z<p>When one writes an irreducible fraction $m/n$ as a periodic digit number all one does is to write</p>
<p>$m/n=\frac{a}{999...9000.00}$</p>
<p>So the number of digits before the period is the maximum of the power of $2$ and $5$ in $n$,
i.e. wirting $n=2^\alpha 5^\beta k$ with $k$ relatively prime to $10$, the number of digits before the
period is $\max{\alpha, \beta }$.</p>
<p>I think that this will follow for free from the following lemma, whose proof is trivial:</p>
<p>Lemma: if gcd$(k,10) =1$ then $k$ has a multiple of the form $999...9$.</p>