Inverse of a prime with period 5 For a certain 3-digit prime $p$, the decimal expansion of $1/p $ has period $5$. Find $p$. Approach? Thank you.
 A: Consider $100000/p$, and compare with $1/p$.
A: The preiod is $5\implies\dfrac1p=.\overline{abcde}\cdots=\dfrac{\overline{abcde}}{10^5}\cdot\dfrac1{1-1/10^5}=\dfrac{\overline{abcde}}{10^5-1}$ for some positive integer $\overline{abcde}$
$\implies\dfrac{{10^5-1}}p=\overline{abcde}$ which is an integer $\implies p$  must divide $10^5-1$
A: Also the periods have to be a factor of $p-1$. In this case $5$ is given as a period, so $p$ has to be of the form $10k+1$ and combining it with lab bhattacharjee's remark we see that has to be a factor of $11111$. So your job is to locate the a 3-digit prime number that ends with 1 and divides $11111$
A: $\rm\qquad\qquad\qquad  \dfrac{1}p\ \ =\ 0\:.\overline{c_1c_2\cdots c_5}$
$\rm\quad\iff\quad\ \ \dfrac{10^5}p\ =\ \underbrace{c_1c_2\cdots c_5}_{\large c}\,.\,\overline{c_1c_2\cdots c_5}  $  
$\rm\qquad\qquad\qquad\quad\ \  =\ \ c\ +\ \dfrac{1}p$
$\rm\quad\iff \dfrac{10^5\!-1}p\ =\ \ c$
$\rm\quad\iff\qquad\ \dfrac{1}p\ \ = \ \dfrac{c}{10^5-1}$
Thus $\rm\,p\,$ is a divisor of $\,10^5\!-1\, =\, 3^2\cdot 41\cdot 271.\,$ This yields
$\qquad\qquad\quad \begin{align} 
\dfrac{1}{41}\ =&\ \ \dfrac{2439}{99999}\ =\ 0.\overline{02439}\\
\dfrac{1}{271}\ =&\ \ \dfrac{369}{99999}\ =\ 0.\overline{00369}\end{align}$
besides the degenerate period $\,1\,$ fraction $\,1/3.$
See this answer for the general case with an initial preperiodic part. 
