# If $N\in \mathbb N$ is a palindrome in base $b$, can we say it is a palindrome in other bases?

I have noticed a pattern among palindromic numbers, and was curious if there is a general truth out there. My examples are limited to smaller bases so that numerals may be used. My conjecture is that if $N_b$ is a palindrome with $b=p^n$ for some prime $p$ and all digits of $N_b$ are less than $p$ then $N_p$ is also a palindrome. For example,

$$10100101_8 = 1000001000000001000001_2$$
$$12022021_9 = 102000202000201_3$$

Using only divisibility as a criterion, the conjecture does not hold, since the first example above is equal to $20020001001_4$.

My central question is pretty big I guess. If $N_b$ is a palindrome, for which $a$ is $N_a$ a palindrome? I’m interested in any subcases such as this one as well.

#### Solutions Collecting From Web of "If $N\in \mathbb N$ is a palindrome in base $b$, can we say it is a palindrome in other bases?"

First question

First case : $N_{p^n}$ has an even number of digits $2(m+1)$. Let
$$N_{p^n} = a_0a_1a_2a_3 \ldots a_{m-1}a_ma_ma_{m-1} \ldots a_3a_2a_1a_0$$
Let’s transform $N_{p^n}$ to base $10$:
$$N_{p^n} = [a_0\cdot(p^n)^{2m+1}+a_1\cdot(p^n)^{2m}+a_2\cdot (p^n)^{2m-1}+\ldots + a_2\cdot (p^n)^{2} +a_1\cdot (p^n)^{1}+a_0 ]_{10}$$
And now turn the number obtained to base $p$, with the division method:
$$N_{p^n} = [a_0\cdot(p^n)^{2m+1}+a_1\cdot(p^n)^{2m}+a_2\cdot (p^n)^{2m-1}+\ldots + a_2\cdot (p^n)^{2} +a_1\cdot (p^n)^{1}+a_0 ]_{10} =$$
$$a_000 \ldots 00a_100 \ldots 00a_200 \ldots 00 \ldots a_m00 \ldots 00a_m \ldots a_200 \ldots 00a_100 \ldots 00a_0$$
which is a palindrome number. Note that in all the series of $0$s the digit “$0$” appears $n-1$ times. Actually this is the right representation of $N_{p^n}$ in base $p$, because $a_i < p$ $\forall$ $i$ $|$ $0 \leq i \leq m$, so when you divide the number by $p$ the reminder is $0$ or $a_i$. Furthermore the reminder is $0$ exactly $n-1$ times, because, once you get a reminder $a_i$, then the quotient is divisible by $p^{n-1}$ (and not by $p^{n}$). So when you reiterate the divisions you get a remainder $0$ for exactly $n-1$ operations and then you get a remainder of $a_{i+1}$.

Second case : $N_{p^n}$ has an odd number of digits $2(m+1)+1$. Let
$$N_{p^n} = a_0a_1a_2a_3 \ldots a_{m-1}a_ma_{m+1}a_ma_{m-1} \ldots a_3a_2a_1a_0$$
Let’s do the same and let’s convert $N_{p^n}$ to base $10$:
$$N_{p^n} = [a_0\cdot(p^n)^{2m+2}+a_1\cdot(p^n)^{2m+1}+a_2\cdot (p^n)^{2m}+\ldots +a_m\cdot(p^n)^{2m+2}+a_{m+1}\cdot(p^n)^{2m+1}+a_m\cdot(p^n)^{2m} + \ldots + a_2\cdot (p^n)^{2} +a_1\cdot (p^n)^{1}+a_0 ]_{10}$$
and similarly convert the number obtained to base $p$, we get:
$$N_{p^n} = [a_0\cdot(p^n)^{2m+2}+a_1\cdot(p^n)^{2m+1}+a_2\cdot (p^n)^{2m}+\ldots +a_m\cdot(p^n)^{2m+2}+a_{m+1}\cdot(p^n)^{2m+1}+a_m\cdot(p^n)^{2m} + \ldots + a_2\cdot (p^n)^{2} +a_1\cdot (p^n)^{1}+a_0 ]_{10} =$$
$$a_000 \ldots 00a_100 \ldots 00a_200 \ldots 00 \ldots a_m00 \ldots00a_{m+1}00\ldots 00a_m \ldots a_200 \ldots 00a_100 \ldots 00a_0$$
and we followed the same reasoning as in the first case, so the $0$s are always $n-1$ and we obtained a palindrome number too (see previous case for better explanation).

$Q.E.D$

Second question
As you can imagine if $N_{p^n}$ and $N_{p}$ are both palindrome, then $p$ must be any prime. Unfortunately your conjecture holds only for prime numbers, and not in general.

Counter-example (for part 1) :
$$45611211654_{49} = 405060101020101060551_{7}$$