A positive integer n (without leading zeros) has the property that shifting the rightmost digit of n to the left end doubles the number.
Examples: 1->1, 1234->4123, 2020->202
What is the smallest n with this property?
Puzzling Stack Exchange is a question and answer site for those who create, solve, and study puzzles. It only takes a minute to sign up.
Sign up to join this communityA positive integer n (without leading zeros) has the property that shifting the rightmost digit of n to the left end doubles the number.
Examples: 1->1, 1234->4123, 2020->202
What is the smallest n with this property?
I think the answer is
$$N = 20 \left(\frac{10^{17} -2}{19}\right) + 2$$
Proof
Suppose we write our original number as $$N = a_n 10^n + a_{n-1}10^{n-1} +\ldots + a_0 = \displaystyle \sum_{j=0}^n a_j 10^j$$ Then the equation described in the problem is $$ 2 \displaystyle \sum_{j=0}^n a_j 10^j = a_0 10^n + \displaystyle \sum_{j=1}^n a_j 10^{j-1}$$ Rearranging gives $$ \displaystyle \sum_{j=1}^n a_j ((2 \times 10^j) - 10^{j-1}) = a_0 (10^n - 2)$$ which means that $$ 19 \displaystyle \sum_{j=1}^n a_j 10^{j-1} = a_0 (10^n -2)$$ Now notice that the left hand side is divisible by $19$ so the right hand side must be also but since $a_0$ is coprime to $19$, this means that $10^n - 2$ is divisible by $19$. Therefore, we are looking for the smallest power of $10$ which is congruent to $2$ modulo $19$.
Going through powers of $10$ modulo $19$ gives $10, 5, 12, 6, 3, 11, 15, 17, 18, 9, 14, 7, 13, 16, 8, 4, 2, \ldots$.
Hence, the smallest power of $10$ that works is $10^{17}$. Plugging this into our equation gives $$ \displaystyle \sum_{j=1}^{17} a_j 10^{j-1} = a_0 \frac{10^{17} -2}{19}$$ Clearly, we cannot pick $a_0=1$ as the right-hand side will have too few digits, but if we pick $a_0=2$ (to achieve the minimum) then it looks safe that we will have a $17$-digit number on the right-hand side and we can just pick the rest of the $a_j$ appropriately on the left.
This means that the smallest $N$ which works must be $$N = 20 \left(\frac{10^{17} -2}{19}\right) + 2$$
Computer check
Working it out with a computer it seems the value for $N$ above is $105263157894736842$ and doubling this gives $210526315789473684$ so this does indeed work.