2

I need help with this puzzle, I tried to solve it but could find what's wrong with my solution, forgive me if I have any silly mistakes. it has been quite some time since I have done any mathematics.

The Puzzle: A natural number n is a rotor if and only if the decimal representation of n+n is the same as a rotation of the decimal representation of n in which the last digit has been moved to the front. In other words, the decimal representation n1 n2 ... nk-1 nk satisfies the following sum.

  n1    n2  ... nk-1    nk
+ n1    n2  ... nk-1    nk
 ____________________________
  nk    n1      ...     nk-1

What is the smallest rotor?

I started by the following:

because n1 = $\dfrac{n_k}{2}$

and ny = $\dfrac{n_k}{2 * y}$ ----> (1)

and because nk = $\dfrac{n_{k-1}}{2}$ ---->(2)

from (1) and (2)

nk = $\dfrac{n_k}{2 * k}$ = $\dfrac{n_k}{4 *( k-1)}$

can't I from nk = $\dfrac{n_k}{2 * k}$ infer that k = 1/2 ?

and can't I from $\dfrac{n_k}{2 * k}$ = $\dfrac{n_k}{4 *( k-1)}$ infer that k = 2 ?

I don't understand what I am doing wrong, any help please ? and what is the proper solution to the original problem ? thanks a lot

A. S.
  • 107
  • Welcome. Please explain $k$ and $n_k$ for the benefit of other users, it would be very easy to copy-paste the problem without a link – FShrike Aug 15 '22 at 20:37
  • @FShrike Done.. – A. S. Aug 15 '22 at 20:41
  • 1
    You need to consider the possibility of carries while performing the sum... for instance, it might be that $n_1+n_1=n_k$, but $n_1+n_1+1=n_k$ is also possible (in particular, if $n_2 \ge 5$). – mjqxxxx Aug 15 '22 at 20:44
  • @mjqxxxx I'm sorry I don't know how to consider that possibility mathematically – A. S. Aug 15 '22 at 20:59
  • Write the number as $n=10a+b$, where $b$ is one digit (your $n_k$). Then $2n=10^pb+a$ where $p$ is the number of digits in $a$. See if that helps. – Ross Millikan Aug 15 '22 at 21:18
  • @RossMillikan I am afraid I don't understand the meaning behind the two equations and don't know what they relate to – A. S. Aug 15 '22 at 22:50
  • $n$ is the number you seek. If you look at the two right hand sides they represent moving the last digit to the front, which is supposed to double the number. That is why the second left side is $2n$. To try it, pretend $n=1234$. From the first equation what is $a$? What is $b$? What is the second right side (which will not be $2n$)? Look at the digits and you will see how it works. – Ross Millikan Aug 16 '22 at 00:44

1 Answers1

3

There are two straightforward ways to approach this: from left to right, or from right to left, in either case starting with a guess for $n_k$.

Right to left

Suppose $n_k=4$. Then, summing the ones digit ($4+4$) gives $n_{k-1}=8$. Next, summing the tens digit ($8+8$) gives $n_{k-2}=6$, with a carry of one to the next column. Denote that as $6'$. Continuing, $6'\rightarrow3'$, $3'\rightarrow 7$, $7\rightarrow 4'$, etc. If we get back to the starting point ($4$, in this case), then we've found a rotor. If we enter a loop, then there's no rotor ending with $4$. Here are the outcomes for the $10$ possible values of $n_k$:

  • $n_k=0$: $0,0,\ldots$ (loop of period $1$, and no solution)
  • $n_k=1$: $1,2,4,8,6',3',7,4',9,8',7',5',1',3,6,2',5,0',1,\ldots$ (loop of period $19$, solution?)
  • $n_k=2,3,4,5,6,7,8,9$: see $n_k=1$, but with different starting points.

So we've found a number of rotors, related to each other by... well... repeated rotoring:

  • $052631578947368421$ (from $n_k=1$; doesn't count because the leading digit can't be $0$)
  • $105263157894736842$ (from $n_k=2$)
  • $157894736842105263$ (from $n_k=3$)
  • etc.

The smallest is $105263157894736842 \approx 1.05 \times 10^{17}$.

Left to right

Suppose $n_k=4$. Then, looking at the leftmost column, we must have $n_1=n_k/2=2$, and $n_2 < 5$ (to ensure no carry). Continuing, we must have $n_2=n_1/2=1$ and $n_3 < 5$. Next, we must have $n_3=0$ and $n_4\ge 5$ (because $0+0$ needs a carry to yield a $1$). Write the constraint of $n_4\ge 5$ as a prime ($'$) on the value of $n_3$: we have $n_3=0'$. And so on: $4,2,1,0',5,2',6,3,1',5',7',8',9,4',7,3',6',8,4,\ldots$. This is just the reverse of the sequence above, as it should be. We can read off all possible rotors by starting at any unprimed position and transcribing a multiple of $19$ digits. For instance, $421052631578947368421052631578947368$ is a rotor.

Exercise for the reader

Let $R(n)$ be the "rotation" of the natural number $n$. We've shown that the smallest $n$ such that $R(n)=n+n=2n$ is $105263157894736842$. What is the smallest $n$ such that $R(n)=3n$?

mjqxxxx
  • 41,358