this is a number systems question and I am currently trying to prove this statement :
"A fraction $\frac{a}{b}$ (with $a, b \in \mathbb{Z}$, where $b\neq0$) in lowest terms has a terminating decimal if and only if the prime factorization of b has only factors of 2 and factors of 5."
I am not sure how to start the proof is it's very general so any tips are much appreciated.Thank you very much in advance !
$$\frac{a}{b}=a_1...a_k.b_1...b_n \Rightarrow \frac{a}{b}=\frac{a_1...a_kb_1...b_n}{10^n}$$
Thus $\frac{a}{b}$ can be obtained by reducing the RHS.