In a collection of number theory problems, I found this one:

Give the last digit of the decimal period of $$\frac{133}{7^{88}}$$

After we start simplfying to $$\frac{19}{7^{87}}$$ I don't know what else to do. I do know that the period will be of $6\times7^{86}$ digits long, so it is infeasible to compute in the near(and very likely to be far) future with brute force. Midy's theorem does not help too much either. What to do next?


Hint: If $\gcd (p,10) = 1$, consider the fraction $\frac{1}{p} = 0. \overline{a_1 a_2\ldots a_n}$. What can you say about $p \times \overline{a_1 a_2\ldots a_n}$?

$p \times \overline{a_1 a_2\ldots a_n} = 10^n -1$

In particular, what is $p \times a_n \equiv \pmod{10}$?

$p \times a_n \equiv 9 \pmod{10}$

Now substitute $p = 7^{87}$. What is $a_n$? (You might find it useful to apply Euler's Theorem, which states that $7^4 \equiv 1 \pmod{10}$.

$7^{87} a_n \equiv 9 \Rightarrow a_n \equiv 3 \pmod{10}$

Now, what is the last digit in $\frac{19}{7^{87}}$?

It is the last digit of $19 \times 3 \equiv 7 \pmod{10}$.

Note: A similar procedure allows you to find the last $k$ digits.

  • $\begingroup$ I get what you mean, but I cant see why this helps. $\endgroup$ – chubakueno Sep 19 '13 at 4:32
  • $\begingroup$ @chubakueno What would take the place of ?? $\endgroup$ – Calvin Lin Sep 19 '13 at 4:33
  • $\begingroup$ $9$, but how do I proceed then? $\endgroup$ – chubakueno Sep 19 '13 at 4:34
  • $\begingroup$ @chubakueno I added the rest of the steps $\endgroup$ – Calvin Lin Sep 19 '13 at 4:36
  • 2
    $\begingroup$ @chubakueno As a plug, I'd encourage you to check out Brilliant, if you want to learn math. $\endgroup$ – Calvin Lin Sep 19 '13 at 4:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.