[Math] Hint for: Prove any terminating decimal can be represented as a rational number

decimal-expansionrational numbers

I am currently working on a problem from Hardy and have been stuck trying to figure out what to do. I was wondering if someone could provide me with a hint that may help jump-start my thought process.

Here is the question:

Any terminating decimal represents a rational number whose denominator contains no factors other than 2 or 5. Conversely any such rational number can be expressed, and in one way only, as a terminated decimal.

My work so far:

Take an arbitrary terminating decimal, $d.d_1d_2…d_n$ where $d_i$ represents a positive integer.

Therefore, for the first part of the proof we need to prove the existence of a positive integer a, such that $a\times d.d_1d_2…d_n$ such that this product is an integer.

The existence of such as a can be proven simply by taking $a=10^n$ therefore, the rational number can be represented as $\frac{10^n\times d.d_1d_2…d_n}{10^n}$ Any common factor $b$ can be found such that this reduces to a rational number. This proves the first statement.

My concern:

My proof seems very "crude" and it doesn't seem to address the no factors other than 2 or 5 part of it. Also I cannot seem to get the converse to come from it.

I would appreciate a hint, if possible, to get me going in the right direction.

Best Answer

Your proof seems very nice to me. You have represented your decimal as a (potentially) reducible rational with $10^n$ as the denominator. Clearly reduction will not introduce any new factors into the denominator so the only factors of the denominators are the factors of $10$, i.e. $2$ and $5$.

The converse is similar. Consider a fraction of the form $$r=\frac{x}{2^a5^b}$$ If $a=b$ then it is easy to see that we have a terminating decimal with the same digits as $x$ (except shifted of course). If the factors on the bottom are unequal in power, then try to "complete" the $10$ to get a form similar to the previous case. You can then finish off by using the uniqueness of the decimal expansion for a number.