Hacker News new | ask | show | jobs
by jayceekay 3877 days ago
> In contrast, 1/3, 1/6, and 1/7 are all repeating decimals because their denominators use a prime factor of 3 or 7.

doesn't 1/6 use a prime factor of 2 as well?

2 comments

In the fraction 1/6, the prime factors of the denominator are 2 and 3. A base 10 number system has the 2 but not the 3.
got it, thanks!
Yes, but in order to have a non-repeating decimal expansion, the denominator must share _all_ of its factors with the base. That is, only fractions that, when reduced, have a denominator of the form 2^n*5^m (for natural numbers n, m) will terminate in base 10. The explanation given could probably be clearer.
ah yes, the _all_ is what i missed. thanks.