What is the smallest natural number $N$ such that moving the last digit to the front one gets the number $9N$? In other words, find the least $N$ such that if $N$ has decimal expansion $abc...xyz$, then $9N$ has decimal expansion $zabc...xy$. (Note: the number being asked for is very big!).

HINT: For solving this question I have calculated the powers of $10$ modulo $89$ for which I have used just $89k$ with $k = 1, 2, 3,...,9$ (sorry for the bad English).

Another related question inspired from this one has been asked here.

  • $\begingroup$ My preliminary calculations indicate that no such number exists. I'll double-check and post as an answer if I can confirm. $\endgroup$ – user2566092 Apr 13 '15 at 16:42
  • $\begingroup$ You mean if the decimal expansion of $N$ is $abc\ldots xyz$ then the decimal expansion of $9N$ is $zbc\ldots xya$? With $a\ne0$, this is not possible $\endgroup$ – Hagen von Eitzen Apr 13 '15 at 16:42
  • $\begingroup$ I forget the obvious a = 0, Hagen von Heitzen. On the other hand, there are an infinity of such numbers the smallest of them being10112359550561797752808988764044943820224719 $\endgroup$ – Piquito Apr 13 '15 at 19:09
  • $\begingroup$ Put on hold as off-topic? I built this problem from a similar and much simpler property given by Euler I do not remember where. The answer is not immediate but is not very difficult. $\endgroup$ – Piquito Apr 13 '15 at 19:56
  • 1
    $\begingroup$ @String: Why don't you turn your comment into an answer? $\endgroup$ – user87690 Apr 14 '15 at 12:43

Clearly, the first digit has to be $1$ and the last has to be $9$. Then we have $$ 9N=\frac{N-9}{10}+10^k\cdot 9 $$ where $N$ has $m=k+1$ digits as a total. Solving for $N$, this leads to $$ N=\frac{9(10^m-1)}{89} $$ and since $10$ has order $44$ modulo the prime $89$ we get solutions for $m=44s$, ie. $$ N=\frac{9(10^{44s}-1)}{89} $$ which for $s=1$ yields $$ N=\color{blue}{1011235955056179775280898876404494382022471}\color{red}9 $$ which has $$ 9N=\color{red}9\color{blue}{1011235955056179775280898876404494382022471} $$ as desired.

  • $\begingroup$ Very beautiful presentation! $\endgroup$ – Piquito Apr 14 '15 at 23:30

This in an answer to the original formulation of the question, where the performed operation was swapping the first digit with the last digit, rather than moving the last digit to the first place while rotating the number.

No such $N$ exists. Let $a$ be the first digit of $N$, $b$ the last digit of $N$. We demand that $N + b · 10^n - a · 10^n + a - b = 9N$, where $n + 1$ is the length of $N$. We have $(b - a)(10^n - 1) = 8N$. Since $a, b ∈ \{1, …, 9\}$, we have $b - a = 8$, $b = 9$, $a = 1$ and $N = 10^n - 1$, which is a contradition.

  • 1
    $\begingroup$ @Elaqqad: $(10^n - 1)$ is not divisible by $2$. $\endgroup$ – user87690 Apr 13 '15 at 16:47
  • $\begingroup$ You have wrong dear friends user87690,mjqxxx, and user31415; read the comment to Hagen von Heitzen,please. $\endgroup$ – Piquito Apr 13 '15 at 20:15
  • $\begingroup$ @LuisGomezSanchez: The way you were asking seemed to be at best misleading. I made an edit to your question so that it is now consistent with the example of an answer you gave in the comment section to the OP. I also solved it in the comments ... Check if those things are correct. $\endgroup$ – String Apr 13 '15 at 21:50
  • $\begingroup$ I appreciate a lot String. $\endgroup$ – Piquito Apr 13 '15 at 22:37
  • $\begingroup$ @LuisGomezSanchez: Maybe you know how to answer my related question then? $\endgroup$ – String Apr 13 '15 at 23:02

No such $N$ exists. The first and last digits of $N$ are $1,9$, respectively.

$$9\cdot \overline{1a_1a_2\ldots a_n 9}=\overline{9a_1a_2\ldots a_n 1}\iff 8\cdot \overline{a_1a_2\ldots a_n 0}=-80$$

But $\overline{a_1a_2\ldots a_n 0}>0$, impossible.


Let $a \neq 0$ be the first digit, $x \ge 0$ be the middle portion (with $L$ digits), and $b$ be the last digit. Then $$ N = 10^{L+1}a + 10x + b, $$ and we need to have $$ 10^{L+1}b + 10x + a = 9N = 9\cdot 10^{L+1}a + 90x + 9b, $$ or $$ 80x = (10^{L+1} - 9)b - (9\cdot 10^{L+1} - 1)a. $$ Unless $b=9$ and $a=1$, the right-hand side is negative; so we need $$ 80x = (10^{L+1} - 9)\cdot 9 - (9 \cdot 10^{L+1} - 1) = -80, $$ which is impossible.


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.