Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given a rational number $\frac{n}{d}$, I understand that in the base $10$ number system, the number can be represented as a non-repeating decimal number if and only if $d$ has only prime factors of $2$ and $5$.

I have a hypothesis that the reason for this is because $2$ and $5$ are the prime factors of $10$, which is the base for our number system. So according to my hypothesis, on a base $6$ number system, a rational number could be represented as a non-repeating decimal if and only if the denominator's only prime factors are $2$ and $3$.

But this is just a hypothesis, I don't know exactly why it is true. I'm not sure what the connection is between the prime factors of the base, and whether or not a rational number will be a repeating decimal. Can someone demonstrate why this holds true?

share|cite|improve this question
This is true only after you reduce the fraction to the lowest term. Note that $\frac{3}{6}$ is finite. – N. S. Jun 6 '13 at 14:24
up vote 4 down vote accepted

If $b$ is the base, then a non repeating number $n/d$ is of the form $$ \frac{n}{d}=\frac{a}{b^k} $$ where I assume that $n$ and $d$ have no common factors. Also we can assume $k>0$ or the fraction $n/d$ would already be an integer.

This means $$ nb^k=ad. $$ If $p$ is a prime factor of $d$, then $p$ divides $nb^k$, but it can't divide $n$ so it must divide $b^k$, hence $b$.

Here I use the well known property of prime integers: if $p$ is prime and $p$ divides $xy$, then $p$ either divides $x$ or $y$.

share|cite|improve this answer

Your hypothesis is true. In base $b$, the expansion of $\frac nd$ (with $n,d$ coprime) is terminating (i.e. ends in repeating $0$s) if and only if $b^k\cdot\frac nd$ is an integer for sufficiently large $k$ (take for $k$ the number of digits after the period). That is $d$ must divide $b^k$. This implies that $d$ must not have any prime divisor except those dividing $b$, and vice versa for such $d$ it is always possible to find suitable $k$.

share|cite|improve this answer

Every rational number have form $\frac{n}{d}$, where $n$ and $d$ are coprimes. If you want to represent it as a decimal number you have to transform it to form $\frac{u}{10^v}$. $u$ is an integer when you multiply counter and denominator by the same integer. $d$ can be multiplied by some integer to form $10^v$ only if $d=2^{\alpha_2}\cdot 5^{\alpha_5}$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.