Relating the base-p periodic expansion of a rational to its p-adic representation

1.1k Views Asked by At

Suppose you have a rational number $0 < r < 1$, and you want to express it in some prime base $p$. Then assuming the denominator r has a periodic expansion in the base, we might ask how the base-p real expansion and the p-adic expansion are related.

Messing around with a few examples here has led me to the following conjecture:

Conjecture: given some rational $0 < r < 1$ that has a periodic expansion in some base $p$, the period is identical to that of the $p$-adic expansion of $-r$.

Examples:

  • 12/13, base 2 real expansion: $0.\overline{111011000100}...$
  • -12/13, 2-adic expansion: $...\overline{111011000100}$
  • 12/17, base 3 real expansion: $0.\overline{2010011202122110}...$
  • -12/17, 3-adic expansion: $...\overline{2010011202122110}$

and so on.

This all seems intuitive enough from experimenting around with p-adic solenoids back in the day, which can be thought of as having infinite expansions to the left and right of the radix point, but where all periodic sequences infinite in both directions are equal to zero (for example, in the 2-adic solenoid, $...11111.11111... = 0$.

However, I'm not quite sure how to prove this rigorously. Under what conditions does this hold, and how does one prove this formally? Can this be extended to rationals outside of the range mentioned?

2

There are 2 best solutions below

0
On BEST ANSWER

This is simple to prove when you write down what these periodic expansions actually mean. Note that in $\mathbb{R}$, $$\sum_{n=1}^\infty p^{-kn}=\frac{p^{-k}}{1-p^{-k}}=\frac{1}{p^k-1}.$$ That sum is exactly the number whose base $p$ expansion is $0.\overline{00\dots01}$, where there are $k-1$ $0$s. So in general, a rational number $0<r<1$ which has a $k$-periodic base $p$ expansion is just a number of the form $r=\frac{m}{p^k-1}$ for $0<m<p^k-1$, and the repeating sequence is just the base $p$ form of the integer $m$.

On the other hand, in $\mathbb{Z}_p$, $$\sum_{n=0}^\infty p^{kn}=\frac{1}{1-p^k}=-\frac{1}{p^k-1}$$ and this sum is similarly the number $\overline{00\dots01}$. So a rational number with $k$-periodic $p$-adic expansion is just a number of the form $-\frac{m}{p^k-1}$ for $0<m<p^k-1$, where the repeating sequence is just the base $p$ form of $m$.

Combining these two observations gives exactly your conjecture.

2
On

if $r$ is rational whose denominator is coprime with $p$ then it can be written as $r = a/(p^n-1)$ for some integers $a$ and $n$ and it gives you a relationship between $r$ and $p^nr$.

If you write it as $r = ap^{-n}+rp^{-n}$, you get a way to write $r$ as an infinite sum that converges in the usual topology : $r = ap^{-n} + ap^{-2n} + ap^{-3n} + \ldots$

If you write it as $r = -a + rp^n$, you get a way to write $r$ as an infinite sum that converges in the $p$-adic topology : $r = -a -ap^n -ap^{2n} - \ldots$

If you define $r$ as any of those limits with the correct topology, they both satisfy the equation $(p^n-1)r = a$, so they are the same rational number.

I think you can define a kind of numbers where the expansion is infinite both ways and define an addition that extends both normal and $p$-adic addition (however it's impossible to define a multiplication there), and some numbers (those that have an infinite trail of zeros on the right) have two expansions, and in particular, $0 = \ldots 9999.9999\ldots$.

In this system, a "periodic" number, when added to himself enough times, will end up on $\ldots 999.999\ldots$, so they are torsion elements of the group.