Finding the repeating decimal form of a fraction $\frac{1}{p}$

arithmeticelementary-number-theory

I was reading the book Dead Reckoning: Calculating Without Instruments by Ronald W. Doerfler and in it, he mentions a method to convert fractions of the form $\frac{1}{p}, p \in \mathbb{N}$ to a repeating decimal (he uses $t$ instead of $p$). I got what he did there, as in I can now imitate the method and perform the computation but can anyone please explain to me why this method works? I am unable to figure it out myself.

This is the first part of the explanation.

This is the continuation of the same.

I will add that I got through high school recently and I am not very familiar with number theory but is there a way to prove why this works? Thanks in advance!

Edit: I am quoting the text of the author here as well so that it can be read even without accessing the images.

We now turn to the task of finding the decimal expansion of a reciprocal $\frac{1}{t}$. The process of long division, which we can end when a remainder is repeated in the course of a calculation, is the obvious approach. There is another method which is frequently more convenient, particularly if the period of the recurring group is large. We divide by long division until some digits are determined and a low remainder is found. Then we can multiply the entire quotient (including the fraction remainder/$t$) by the remainder, converting the fractional part to proper form. Any digits to the left of the decimal point are discarded. This process of multiplication can be repeated until the recurring group is found, with checks provided by our earlier observations. For example, let us consider the reciprocal of 43: $$\frac{1}{43} = 0.023\frac{11}{43}$$ $$\frac{11}{43}=11 \left(0.023\frac{11}{43} \right) = 0.253 \frac{121}{43} = 0.255 \frac{35}{43}$$ $$\frac{11^2}{43}=11 \left(0.255\frac{35}{43} \right) = 2.805 \frac{385}{43} = 2.813 \frac{41}{43}$$ etc. $$ $$ Then $\frac{1}{43} = 0.023255813 \dots$ $$ $$ We haven't reached the end of a recurring group yet, and of course it may take 42 digits. We could continued our initial long division further and found $\frac{1}{43} = 0.0232558 \frac{6}{43}$. On the other hand, we can continue to $\frac{1}{43} = 0.023255813 \frac{41}{43}$, either by long division or even better as the intermediate result from multiplying by elevens in the calculation given above. Here we can take our remainder as -2 (I find that authors of arithmetic methods often don't take arithmetic literally enoough). Then $$\frac{1}{43} = 0.023255814\frac{-2}{43}$$ $$\frac{-2}{43} = -2\left(0.023255814\frac{-2}{43}\right) = -0.046511628 \frac{+4}{43}$$ $$\frac{(-2)^2}{43} = -2\left(0.046511628\frac{4}{43}\right) = 0.093023256 \frac{-8}{43}$$ See the recurrence beginning in the last result, realizing that $6-\frac{8}{43} = 5\frac{35}{43}$? We find then that $$\frac{1}{43} = 0.\overline{023255813953488372093}$$ where the raised line indicates the recurring group.

Best Answer

Two things are important to this method:

  • We can represent 1 as $10^x\over{10^x}$
  • When we square a number we square its remainder.

So lets look at my comment example:

$1={100\over 100}$ which we can divide by 97 by dividing the numerator by 97 getting ${1{3\over 97}\over 100}$ we then use that the remainder is in a fractional form that's a multiple of what we start with so if $1\over 97$ starts 0.01 then $3\over 97$ starts 0.03 we shift it to the hundredths place because we still have denominator 100. We get 0.0103 now we have denominator $100^2=10000$ and squaring the remainderwe get 9/97 which in theory is just 9*1/97 which we are in the process of calculating we know 9/97 starts 0927 so appending that we get 0.01030927 squared the denominator we now deal with 81/97 which is .81+0.0243+0.000729+0.00002187=.83505087 that we append. Now we deal with the squaring of of the remainder getting 6561/97=67 remainder 62 answer can double the approximate length every time we do this and Euler's totient theorem gives an upper bound on how long the reptend can be.

Related Question