[Math] If the last three digits of the repetend are $A67$, compute the digit $A$

contest-mathdecimal-expansionelementary-number-theorynumber theory

When expanded as a decimal, the fraction 1/97 has a repetend (the repeating part of the decimal) that begins right after the decimal point and is 96 digits long. If the last three digits of the repetend are $A67$, compute the digit $A$.


This is a past ARML question I came across that I have no idea how to solve. Dividing it directly won't work and I don't know another way to solve this. Thanks in advance for posting a solution!

Best Answer

As it is the end of the reptend, when the $7$ is added to the quotient and multiplied by $97$ the remainder is $1$. We know this because we need to be back where we started from so we can start he reptend over. That means the remainder after the $6$ was $(7 \cdot 97 +1)/10=68$ to which we appended a $0$ and subtracted $679=7 \cdot 97$. Then before the $6$ was added we had $(6 \cdot 97 + 68)/10=65$ Now we need $97A+65$ to end in $0$, so $A=5$