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).

  • $\begingroup$ quora.com/… $\endgroup$ – JMoravitz Oct 30 '18 at 16:55
  • $\begingroup$ Zero is a nice solution. $\endgroup$ – John Douma Oct 30 '18 at 17:03
  • $\begingroup$ @JohnDouma: zero is not a positive integer $\endgroup$ – Vasya Oct 30 '18 at 17:05
  • $\begingroup$ @Vasya I missed that. Thanks. $\endgroup$ – John Douma Oct 30 '18 at 17:05
  • $\begingroup$ @JohnDouma: Happens to us all. I do not think such number is possible. $\endgroup$ – Vasya Oct 30 '18 at 17:07

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} $$

  • $\begingroup$ Is it possible for even bases? specifically base 10? $\endgroup$ – Hussain-Alqatari Oct 30 '18 at 19:59

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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.