For example, like for 1/7 = 0.14285714285. 142857 is repeated in this recurring decimal, and those 6 decimal places are repeated. So is there a method to figure out how many decimal places there are in certain recurring decimals?
Asked
Active
Viewed 86 times
1
-
2I'd be surprised if there was a general method other than brute force. But it is known that $\frac{p}{q}$ (in lowest terms) has a repeating sequence of at most $q-1$ digits. See this sequence too: https://oeis.org/A051626 – Jordan Mitchell Barrett Apr 17 '20 at 07:59
-
2Of course, the answer will also depend on what base you are working in... – Jordan Mitchell Barrett Apr 17 '20 at 07:59
-
For a number $n$ coprime to $10$, you can solve $10^x \equiv 1 \mod n$. In the case of $7$, the solution is $x=6$ as $10^6 \equiv 1 \mod 7$, ie $999999$ is divisible by $7$. The solution of the equation is the period of the sequence of digits. It is probably easier to just perform the division and see. – Peter Phipps Apr 17 '20 at 10:17
-
Brute force huh....I see...but I was wondering what if the denominator or dividend is a large prime number say, 1657. Is there really no method to figure out how many decimal places of repeating decimals there are in the recurring decimal? – Sean Voon Apr 17 '20 at 11:39
-
See Wikipedia Algorithm for positive bases (and the rest of the article). – Peter Phipps Apr 17 '20 at 14:48