# How to show that a real number has a finite decimal representation?

How to show that a real number has a finite decimal representation (one that ends with an infinite sequence of zeros) if and only if it can be represented as a rational number m/n where n has no prime divisors other than 2 and 5.

-

It is the case iff it is written $$\frac a {10^n}$$ for two integers $(a,n)$. so this is a rational number with proper form$$\frac pq$$ with $\gcd(p,q) = 1$.
As $10^n p = aq$ and $\gcd(p,q) = 1$, use Gauss theorem yields $q|10^n$.
Gauss theorem: $a|bc$ and $\gcd(a,c) = 1\Rightarrow a|b$. This is how you get unicity of the prime number factorization. –  mookid Mar 3 '14 at 22:52