I recently stumbled upon an observation: the fraction $\frac{x}{y}$ terminates if and only if $y$ only has prime factors $2$ and $5$.
For example:
$$\frac{1}{20} = \frac{1}{2\cdot2\cdot5} = 0.05$$ $$\frac{1}{6} = \frac{1}{2\cdot3} = 0.1\bar6$$
I think this is true because fractions are in the form:
$$\frac{a}{10} + \frac{b}{100} + \frac{c}{1000} + \ldots$$ $$\frac{a}{2\cdot5} + \frac{b}{2\cdot2\cdot5\cdot5} + \frac{c}{2\cdot2\cdot2\cdot5\cdot5\cdot5} + \ldots$$
How can I rigorously prove this?