If b is an integer greater than 1, then a b-nary representation of a non-negative real number r is an expression of the form
∞
r = ∑ a
ib
-i
i=0
where a
0 is a non-negative integer, and the a
i
are integers satisfying 0 ≤ a
i < b for i = 1,2,3, ...
r = a
0.a
1a
2a
3 ...
An underscored numeral will denote that the numeral is repeated indefinitely. If b=10 for example, then
0.45
783 denotes 0.45783783783783....
No matter what the base b, an irrational number has only one b-nary representation.
Looking at the table below we see that (depending on the base) a rational number can have one or two b-nary representations.
---------------+-----------------------+-----------------------+
Base | Ten | Three |
---------------+------------+----------+------------+----------+
Representation | fraction | b-nary | fraction | b-nary |
---------------+------------+----------+------------+----------+
| 1/3 | 0.3 | 1/10 | 0.10 |
| | | | or |
| | | | 0.02 |
---------------+------------+----------+------------+----------+
| 1/5 | 0.20 | 1/12 | 0.0121 |
| | or | | |
| | 0.19 | | |
---------------+------------+----------+------------+----------+
If p, q, and b are integers with p ≥ 0, q > 0, and b > 1, then what is the relation between p, q, and b
such that the rational number p/q has only one b-nary representation?
Basically what we want to find is if the fraction can be represented as a terminating decimal, as that can be expressed in either its terminating form, or lower the terminal digit by 1 and continue with an infinite repetition of the digit b-1.
It follows that what we want to find is that if, when p/q is reduced to its simplest form, the prime factors of the reduced q are all to be found within the prime factorization of b. For example 3/75 reduces to 1/25, and 25 factors into 5x5. Each of these prime factors (just 5) is a factor of the base 10, so 3/75 = 1/25 can be expressed as the terminating decimal 0.04, and, like all fractions as the repeating 0.0399999....
The trick is to find the most concise way of saying that the reduced q has each of its prime factors represented by a prime factor of b.
The reduced q is just q/gcd(p,q) and it must divide evenly into some b^k where k is a positive integer.
So q/gcd(p,q) mod b^k = 0 for sufficiently large integer k will allow to b-nary representations of p/q, but non-existence of such a k will allow only one b-nary representation.
|
Posted by Charlie
on 2009-04-27 14:59:07 |