Show that a number has a terminating decimal expansion if and only if, it is rational and when in lowest terms, its denominator is coprime to all primes other than 2 and 5.
This is an unsolved question in my lecture notes. I can only seem to prove the converse direction for this. Would appreciate a solution for the other direction.
For converse direction:
let the number, in lowest terms, be given by $\frac{l}{m}$ where $m = 2^ \alpha 5^\beta$, for some positive integers, $\alpha$ and $\beta$.
if $\alpha > \beta$, let $k = 5^{(\alpha-\beta)}$
if $\alpha < \beta$, let $k = 2^{(\beta-\alpha)}$
then $\frac{l}{m} = \frac{kl}{k2^\alpha5^\beta}=\frac{kl}{10^q}$
where q = max($\alpha,\beta$).
hence $\frac{l}{m}$ is a terminating decimal.
