2
$\begingroup$

I was trying to solve the following problem:

Find a number in base $10$, which when multiplied by $2$, results in a number which is a cyclic shift of the original number, such that the last digit (least significant digit) becomes the first digit.

I believe one such number is $105263157894736842$

This I was able to get by assuming the last digit and figuring out the others, till there was a repeat which gave a valid number.

I noticed that each time (with different guesses for the last digit), I got an $18$ digit number which was a cyclic shift of the one I got above.

Is there any mathematical explanation for the different answers being cyclic shifts of each other?

$\endgroup$
  • 2
    $\begingroup$ The short answer is that these numbers are $\frac{n}{19}$ expanded out. $\endgroup$ – Calvin Lin May 15 '13 at 14:26
3
$\begingroup$

Suppose an $N$ digit number satisfies your condition, write it as $N= 10a + b$, where $b$ is the last digit. Then, your condition implies that

$$ 2 (10a + b) = b\times 10^{N-1} + a $$

Or that $b \times (10^{N-1} -1 ) = 19 a$.

Clearly, $b$ is not a multiple of 19, so we must have $10^{N-1} -1$ to be a multiple of 19. You should be able to verify (modular arithmetic), that this happens if and only if $N\equiv 0 \pmod{19} $. This gives us that $N = 19k$, and the numbers have the form

$$\frac{ 10^{19k} + 9 } {19} b = 10 \lfloor \frac{10^{19k-1} } {19} b \rfloor$$

[The equality occurs because $\frac{1}{19} < 1$.]

I now refer you to "When is $\frac{1}{p}$ obtained as a cyclic shift", for you to reach your conclusion.

There is one exception, where we need the leading digit to be considered as 0 (not the typical definition, so I though I'd point it out). We can get more solutions, obtained by concatenations of your number with itself, and several cyclic shifts (and again accounting for a possible leading digit of 0).

$\endgroup$

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.