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

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.


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.