Show that a fraction $r=a / b$ in lowest terms has a finite decimal expansion if and only if $$b=2^{n} 5^{m} \quad$ for some $n, m \geq 0$$ Hint: Observe that $r$ has a finite decimal expansion when $10^{N} r$ is an integer for some $N \geq 0$ (and hence $b$ divides $10^{N} )$ .