Moving last digit to first

2.1k Views Asked by At

Is it possible to find all positive integers $n$ such that if we move its last digit to the first digit, we get $2n$? I.e $2(a_m\cdot 10^m+\ldots +a_0)=a_0\cdot 10^m+a_m\cdot 10^{m-1}\cdots+a_1$

2

There are 2 best solutions below

1
On BEST ANSWER

There are at least two ways to solve this. One is the straightforward algebraic way given by Johannes Kloos and Gerry Myerson. The other is trickier but easier.

Let's guess—just guess—that $2n$ might begin with, say, 6, and see what that would imply. If we divide $2n$ by 2, using the usual short division algorithm, we see at once that $n$ must then begin with 3:

      3 ...      6
     -------------
  2 ) 6??? ...

But the digits of the dividend, $2n$, are exactly the same as the digits of the quotient, $n$, except that the quotient has the 6 on the end instead of on the beginning. So the second digit of the dividend must be 3:

      3 ...      6
     -------------
  2 ) 63?? ...

So continuing with short division, the second digit of the quotient (and the third digit of the dividend) is 1:

      31 ...     6
     -------------
  2 ) 631? ...

This time the short division algorithm says that since there was a remainder of 1 when we divided by 2, the next digit of the quotient is 11/2 = 5:

      315 ...    6
     -------------
  2 ) 6315 ...

Continuing in this way quickly yields:

      315789473684210526
     -------------------
  2 ) 631578947368421052

When we get to a 6 in the quotient and no remainder from the previous division, we can stop, and we have an answer: 315789473684210526 × 2 = 631578947368421052.

All the solutions can be found this way, by selecting some initial digit other than 6. Had we selected 2, we would have gotten the smallest solution, $2n$ = 210526315789473684, and $n=$105263157894736842. (Starting with 1 yields the degenerate solution $2n=$105263157894736842, $n=$052631578947368421; starting with 0 yields the even more degenerate solution $2n=n=0$.)

Had we decided not to stop the first time the initial digit repeated, but to continue dividing until the next stopping point, we would have gotten a solution twice as long; there are arbitrarily long solutions.

3
On

Rewrite the equation as $$19(10^{m-1}a_m+10^{m-2}a_{m-1}+\cdots+a_1)=(10^m-2)a_0$$ and you get $19$ divides $10^m-2$. The smallest solution is $m=17$. So you get $$10^{m-1}a_m+10^{m-2}a_{m-1}+\cdots+a_1=5263157894736842a_0$$. Taking $a_0=2$ you get the solution $$105263157894736842$$

You can get others solutions by taking other values of $a_0$ and/or taking $m=17+18t$, $t=1,2,3,\dots$. Many references will be found by typing 105263157894736842 into Google.