Integer, when reversing its digits, it doubles

90 Views Asked by At

Is there a positive integer, when reversing its digits, it doubles?

That is;

if $n=a_{1}a_{2}a_{3}\cdots a_{k-1}a_{k}$, then $2n=a_{k}a_{k-1}a_{k-2}\cdots a_{1}$, where $a_k$ is the $k$th digit of $n$.

$n=25$ is not a solution since $52\ne50$ (it is only a good guess).

2

There are 2 best solutions below

0
On BEST ANSWER

So basically you want
$\begin{array}\\ \ \ a_{1} a_{2}a_{3}\cdots a_{k-1}a_{k}\\ +\\ \ \ a_{1}a_{2}a_{3}\cdots a_{k-1}a_{k}\\ \hline \ \ a_{k}a_{k-1}a_{k-2}\cdots a_{2}a_{1}\\ \end{array}$
Which leads to either $2a_{k}=a_1$ or $2a_{k}-10=a_1$.
On the other hand, $2a_{1}=a_k$ or $2a_{1}+1=a_k$.
Thus we have four linear systems: \begin{cases} 2a_{k}=a_1 \\ 2a_{1}=a_k \end{cases} \begin{cases} 2a_{k}=a_1 \\ 2a_{1}+1=a_k \end{cases} \begin{cases} 2a_{k}-10=a_1 \\ 2a_{1}=a_k \end{cases} \begin{cases} 2a_{k}-10=a_1 \\ 2a_{1}+1=a_k \end{cases} Only the first one has an integer solution $(0,0)$ which does not satisfy the original requirement

1
On

Consider first and last digit: $p=a_1$ and $q=a_k$. We know that: $$ p = 2q \mod 10,\qquad q = 2p + t \mod 10, $$ where $t$ is carry from the multiplication of $a_{k-1}$ (can be either $0$ or $1$). It's easy to show that all $p$, $q$, $t$ are even, so $t=0$. From that we get: $$ p = 4p \mod 10. $$ By simple check of 4 possible even digits (2,4,6,8) we can see that none of them keeps the last digit after multiplication by 4.

Notably, it is possible to have that number in odd bases. For example, $$ 143_5 = 48_{10},\qquad 341_5=96_{10} $$