Posted on: June 21st, 2013 by
7

Find a nine digit number abcdefghi that uses all the digits 1,2,3,...9 exactly once and satisfies:
a is divisible by 1
ab (2 digit number with digits a and b) is divisible by 2
abc (3 digit number with digits a, b and c) is divisible by 3
.......
.......
abcdefghi is divisible by 9.

abcdefghi = 123456789

1234 is not divisible by 4.

got it! emailed to avoid spoiling it for others.

Posting the solution below with spoiler space. Scroll down for solution. But first really try it -- it's a great puzzle and you can narrow a lot of things down using the divisibility rules and logic.

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
381654729

381654729
explanation:
1. obviously e=5
2. cd can be 12,16,24,28,32,26
3. that means d should be even, also b is even
4. f should be even for divisible by 6
5. h should be even for divisible by 8
6. now choices for cd reduced to 12,16,32,36
7. f and h are even , g is odd. there are only 12 combinations which is divisible by 8
8. for every cd, try 'valid' fgh combination.
9. every combination of abcdefghi will be divisible by 9.

it took me approx 45 minutes. there must be some easy solution i guess.
can there be multiple solutions?

Hi Himanshu, the solution is explained by Singingbanana channel here

I did approximately what you did, himanshu. It also took me about 45 minutes.

I figured
1) e=5
2) b, d, f, and h must be even
3) since those are the only evens, everything else must be odd
4) for abcd to be divisible by 4, cd must be divisible by 4, and with c odd, that means d must be 2 or 6
5) a+b+c must be divisible by 3 and also a+b+c+d+e+f must be divisible by 3, so d+e+f is divisible by 3. So if d is 2, f must be 8, and if d is 6, f must be 4
6) for abcdefgh to be divisible by 8, fgh must be divisible by 8. if f is 8, g is odd (but not 5), h is even but not 2 or 8 -- the only possibilites are 816 or 896. Similarly the only possibilities for f=4 are 432 and 472.
7) for each of those, put the remaining even number in b, and then choose the two remaining numbers that give a+b+c a digit sum divisible by 3. Everything except divisiblity by 7 will work with those two in either order. Check divisiblity by 7 of asdcefg for each of the 8 combinations that come from the 4 choices for fgh combined with the 2 possible orders for a/c that goes with them.
8) put whatever digit is left at the end. We know the entire number is guaranteed to be divisible by nine no matter what order the digits are in (since divisibility by 9 depends on the digit sum which never changes)

There are not multiple solutions. Only one combination works.

{"result":"error", "message":"You can't access this resource as it requires an 'view' access for the website id = 1."}