# A problem for math lovers to count the digits

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.

-
I found the statement of the question a little vague. If you can restate it in a more descriptive way. –  Test123 Jan 21 '14 at 13:54
yes i also agree you the second condition is not explicit but i firstly i was trying to find no. which setisfy first condition –  123 Jan 21 '14 at 13:57
I think the number you're looking for is $142857$. Maybe your check didn't find this one, as you say you went to 100000... –  coffeemath Jan 21 '14 at 14:04
Ok i"ll check but if u can show the proof of second condition. –  123 Jan 21 '14 at 14:06
@Blue It probably means that any number of additions less than 7 permutes the digits in the original number. –  Daniel R Jan 21 '14 at 14:14

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 certain periodic numbers.

-
Clearly, the author just needed to check a little further) +1 –  TZakrevskiy Jan 21 '14 at 14:35

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?

-