Multiplicative Reversibility = No Primitive Roots

400 Views Asked by At

Call a positive integer, $n$, multiplicatively reversible if there exists integers $k$ and $b$, greater than $1$, such that multiplication by $k$ reverses the order of the base-$b$ digits of $n$ (where the leading digit of $n$ is assumed to be nonzero).

Examples: $(2 × 1012 = 2101)_{3}$, $(9 × 1089 = 9801)_{10}$.

Why does the set of multiplicatively reversible numbers seem equivalent to the set of numbers that do not have a primitive root?


The first seven values for multiplicatively reversible numbers in $(b, k, n)$ form:

\begin{align} &(5, 2, 8) \\ &(7, 3, 12) \\ &(11, 3, 15) \\ &(9, 4, 16) \\ &(11, 5, 20) \\ &(8, 2, 21) , (13, 5, 21) \\ &(13, 6, 24) , (17, 5, 24) , (19, 4, 24) \end{align}

1

There are 1 best solutions below

3
On

I use $(a_n a_{n-1} \cdots a_1 a_0)_b$ to mean $\sum a_j b^j$.


I can prove one direction. If $n$ does not have a primitive root, then there is a solution to $x^2 \equiv 1 \bmod n$ other than $\pm 1$. Choose such an $x$ with $1 < x < n/2$ and put $b=n-x$. Then $n$ is $(1x)_b$. We compute $$(x1)_b = xb+1 \equiv -x^2+1 \equiv 0 \bmod n$$ so $n$ divides the reversal of $n$ in base $b$.


Some thoughts about the reverse direction. I can show that $n$ cannot be of the form $p$ or $2p$, but I don't know about $p^j$ or $2p^j$.

Put $c = \frac{b-1}{\text{GCD}(b-1,k-1)}$. If $n$ is a $(b,k)$ reversal, then $kn \equiv n \bmod b-1$ (this is "casting out nines") so $b-1$ divides $(k-1)n$ and thus $c$ divides $n$.

Note also that, since $n$ and $kn$ have the same number of base $b$ digits, we have $k \leq b-1$, and this can be strengthened to $k < b-1$, since equality would only happen for $n = (11 \cdots 1)_b$ and $kn = ((b-1) (b-1) \cdots (b-1))_b$, which are not reversals of each other. Thus, $c>1$.

On the other hand, $b \equiv 1 \bmod c$, so $b>c$, and we know that $n > b$ (since $n$ has $\geq 2$ digits in base $b$). So $n>c$.

We have just shown that $n$ is divisible by $c$ with $1 < c < n$. So $n$ is not prime. To rule out $n=2p$, we must rule out the cases $c=2$ and $c=n/2$.

I will now analyze the case $c=n/2$. This can occur, such as in the cases $(5, 2, 8)$ or $(9, 4, 16)$. However, if this occurs, then $n/2 = c < b-1$ so $n/2$ has only one digit in base $b$, and the base $b$ expansion of $n$ is a two digit number starting with $1$: Say $n = b+x$. Then $xb+1 \equiv 0 \bmod n$, implying that $x^2 = 1 \bmod n$. So this case is the one we already understood, and does not give us any solutions where $n$ has a primitive root.

Finally (for now, at least), I will analyze the case $c=2$. In this case, $\tfrac{b-1}{2}$ divides $k-1$. We know that $k<b$, so we must have $k-1 = \tfrac{b-1}{2}$ and $k = \tfrac{b+1}{2}$. Now, since $n$ and $\tfrac{b+1}{2}n$ have the same number of base $b$ digits, we deduce that the leftmost digit of $n$ is $1$. So the rightmost digit of $kn$ is $1$. We have $kn \equiv 1 \bmod b$ and thus $n \equiv k^{-1} \equiv \tfrac{2}{b+1} \equiv 2 \bmod b$. So the rightmost digit of $n$ is $2$, and thus the leftmost digit of $kn$ is $2$. But $kn$ is $k$ times a number with the same number of digits in base $b$, so the left most digit of $kn$ is at least $k$. This is a contradiction, unless $b=3$ and $k=2$. At this point, we have already ruled out $n=2p$ in all cases except $b=3$, $k=2$.

The case $b=3$, $k=2$ is a "1089 case", in the terminology of Theorem 3.2 in Sloane (take $g=3$, $k=2$, $b=1$ in his notation). Let $m_i = 4 (3^{i+2}-1)$. In base $3$, we have $m_i = (102^i12)_3$ and $2m_i = (212^i01)$. Sloane shows that the $(3,2,n)$ reversals -- are all of the form $m_{i_1} 0^{j_1} m_{i_2} 0^{j_2} \cdots 0^{j_1} m_{i_1}$ for some palindrome $(i_1, j_1, i_2, j_2, \ldots, j_1, i_1)$. Since any such number is divisible by $4$, we cannot get $p^k$ or $2 p^k$ for any odd prime in this way.

We have now run through all possible cases and shown that $p$ and $2p$ are impossible.