# Thread: Determine that a number terminates in base m but will not terminate in base n?

1. ## Determine that a number terminates in base m but will not terminate in base n?

Is there a way to determine that for some number $\displaystyle a$ in base m that it will or will not have a terminating equivalent number $\displaystyle b$ in base n?

For example, when converting number 0.315 in base 10 to base 2, we get the base 2 number 0.01010000101000111101011100001010... I assume this will be nonterminating. How can I actually prove that this number will be nonterminating?

Thanks

2. In base $\displaystyle b$, the numbers which "terminate" are of the form $\displaystyle \frac{a}{b^k}$ for some $\displaystyle a,k\in\mathbb{Z}$.

A necessary and sufficient condition for a rational $\displaystyle {p\over q}$, where $\displaystyle p,q$ are relatively prime, to "terminate" in base $\displaystyle b$ is therefore that the prime divisors of $\displaystyle q$ are prime divisors of $\displaystyle b$. (which is equivalent to saying that $\displaystyle q$ divides $\displaystyle b^k$ for some $\displaystyle k$)

For instance, in base 10, $\displaystyle {p\over q}$ "terminates" iff the only prime divisors of $\displaystyle q$ are 2 and 5 (supposing again that $\displaystyle gcd(p,q)=1$). In base 2, $\displaystyle q$ has to be even.

I hope I was clear. If not, just ask.

Laurent.