Identifying if the rational number terminates or repeats by looking at numerator and denominator

37 Views Asked by At

I was wondering if a rational number p/q can be identified as either repeating decimal or terminating decimal by looking at numerator and denominator. In other words, is there a property that if p and q follow, then p/q is always repeating decimal.

1

There are 1 best solutions below

0
On BEST ANSWER

To terminate you must have $\frac pq=\frac a{10^n}$ for some $n$. As $10^n$ has only $2$ and $5$ for prime factors, so must $q$.