0

My original and basic question is:

How do I detect whether a rational number has a repetend when expressed with a different radix?

Here is my question restated as an example:

Given 0.125(10), is there a way, without actually performing the conversion, to know that it terminates in base 6 as 0.043 but repeats in base 5 as 0.030303...? I don't actually care about the converted value.

Before marking this as duplicate, please continue to read. I know my question is related to this question, but mine is generalized to any radix. That question has an intriguing comment by @labbhattacharjee which says, "in base B, if d(i)∣B, then..."

I'm sorry I cannot repeat it here because I'm not sure how to format it. I also don't know how to parse it. Assuming it's correct, would someone please explain, plainly, what it means? Also, it seems to involve pi and I can't think why it would, unless capital pi means something different from the pi I know and love. I didn't study advanced math; please go easy on me.

In my case, the rational number is guaranteed to not have a repetend in the starting radix. For the purposes of this question, a repeating zero is the same as not having a repetend.

trw
  • 1,063

1 Answers1

4

The comment is indeed cryptic. What it means to say is that you can take numbers $d_i$ each of which divides the base $B$ (that is written $d_i\mid B$) and then the product of powers of those $d_i$ can be used as denominator to get a terminating fraction in base $B$. (Taking a product is written using $\prod$ just like a summation is written$~\sum$; it has no relation whatsoever to $\pi\approx3.1415926$.)

A somewhat more concise way to say the same thing is: for a reduced fraction $\frac mn$ the representation in base $B$ terminates if and only if each prime factor of $n$ also divides$~B$.

Hence $0.125_{10}=\frac18$, where the only prime factor of the denominator is$~2$, terminates in any even base (like$~6$), but not in any odd base (like$~5$).

trw
  • 1,063