A problem for math lovers to count the digits

295 Views Asked by At

Today a classmate of mine asked a question which is based on counting.

Question. Find a positive integer which when multiplied up to $6$ times will give numbers having the same digits but rearranged and after that will give a number with all nines.

I have checked up to $100000$ but no such number is found.

Please help if you could suggest any ideas. Is there any general rule?

2

There are 2 best solutions below

1
On

Multiples of $142857$: \begin{align} 1\times 142857=142857\\ 2\times 142857=285714\\ 3\times 142857=428571\\ 4\times 142857=571428\\ 5\times 142857=714285\\ 6\times 142857=857142\\ 7\times 142857=999999 \end{align}

Note. If $N=0588235294117647$, then $2N,3N,\ldots,18N$ have the same digits as $N$ cyclically rearranged (that's why the 0 in front of $N$), and $18N=999999999999999999$, and this phenomenon is related with the fact that $19$ divides $10^{18}-1$, but it does not divide $10^{k}-1$, for $k<18$, as in the case of $142857$, where $7\mid 10^6-1$, but $7\not\mid 10^k-1$, for $k<6$.

Also, this phenomenon is present in every number system - See Cyclic rearrangements of periods of the decimal expansions of certain rationals.

0
On

There's no need to check values up to 100000 --- there's a simple way to find the answer. You want 7 times the number to be all nines. So you want to look at the numbers 9, 99, 999, and so on, until you find one that is a multiple of 7. And the first one that works is 999999, which is 7 times 142857. Then you just have to check that the other multiples of 142857 behave the way they are asked to behave.

EDIT: Bonus question --- what if you want the 16th addition (instead of the 6th) to give all nines?