*Originally posted by UzumakiAi*

**This number has 9 digits, uses 1-9, and repeats no numbers. It is divisible by 9. If the most right digit were not there, the number would be divisible by 8. If this step were repeated on the next number, the remaining number should be divisible by 7. This goes on until the last number would have 1 digit and be divisible by 1.
**

Please show how you got th ...[text shortened]... 10 minutes to figure this out, so I will post the answer (if no one is right) in about 10 days.

381654729

I don't know if this is a unique solution. My method was as follows:

A) Observe that divisibility by 9 for the whole thing is inevitable - the digits sum to 45, a multiple of 9. Divisibility by 1 for the sole digit is also obviously inevitable.

B) Positions 2, 4, 6 and 8 had to be evens, and the rest odd, fairly obviously.

C) Position 5 had to be 5.

D) Position 4 had to be either 2 or 6. The reason for this is that any odd digit followed by a 2 or 6 will be a multiple of 4, but an odd digit followed by a 4 or 8 won't. For divisibility by 4, only the last two digits are relevant.

E) Similarly, but slightly less obviously, because position 6 is even, and hence position 6 multiplied by 100 is a multiple of 200 and hence of 8, it follows that positions 7 and 8 combined had to be a multiple of 8. Stripping out those with doubled up digits and zeros, that means only 16, 32, 72 or 96 were candidates, which makes position 8 either 2 or 6.

F) Positions 1, 2 and 3 had to sum to three. Because the three-digit number was a multiple of three, the 6 digit number would be a multiple of three, multiplied by 1,000, plus three more digits, which meant that the number at the next three positions had to be a multiple of three, so digits 4,5 and 6 had to sum to three. By the same logic, so did the digits 7 through 9.

G) That left me the following:

Digits 4,5,6 either 654 or 258.

Digits 7,8,9 either 321,327,723,729 or 963.

The remaining even digit would go into position two. The remaining odd digits would go into positions 1 or 3.

That narrows it down to at most 2x5x2 = 20 options.

At that point I got lazy and built a spreadsheet to do trial or error and see which of these permutations divides by 7. 381654729 was the first one I found. It wouldn't take long to check the rest. I can't see how to narrow it down much further than that. I am not aware of any simple test for divisibility by 7.