Add new comment

Permalink
Comment

I just came across this is clever problem! My solution is largely similar to the video solution in that it uses modular arithmetic, but it doesn't use algebra. Like the video the solution uses the following divisibility rules:
a number is divisible by 3 if the sum of its digits is divisble by 3,
divisible by 6 if even and divisible by 3,
and that all 9-digit numbers made by permuting the digits 1..9 are divisible by 9, since their digit sum is 45, which is divisible by 9.

Here it is:

Let the letters a-i represent the nine digits in their respective positions: abcdefghi

1. That ab, abcd, abcdef, and abcdefgh are divisible by 2,4,6 and 8 --> b,d,f,h are even

2. #1 --> a,c,e,g,i are odd

3. abcde=0 mod 5 --> e=5

4. c is odd (#2) and cd=0 mod 4 --> d={2,6} (i.e. the 4-digit number ends in 12,16,32,36 etc.)

5. f is even (#1) and g is odd (#2) and abcdefgh=0 mod 8 --> gh={16,96,32,72} (i.e. gh are multiples of 8) & h={2,6}

6. #4 & #5 --> b={4,8} and f={4,8} (since 2 & 6 are used up only 4 & 8 remain)

The next couple of steps depend on mod 3 arithmetic and the fact that the sum of the digits of a number are 0 mod 3 for it to be divisible by 3. Written across my piece of paper I have
a = {1,3,7,9} = {1,0,1,0} mod 3
b = {4,8} = {1,2} mod 3
c = {1,3,7,9} = {1,0,1,0} mod 3
d = {2,6} = {2,0} mod 3
e = 5 = 2 mod 3
f = {4,8} = {1,2} mod 3
g = {1,3,7,9} = {1,0,1,0} mod 3
h = {2,6} = {2,0} mod 3
i doesn't matter since it's determined by the rest

7. abc=0 mod 3 & e=2 mod 3 & #6 --> def={258,654} for abcdef to be divisible by 6 (i.e. since e=2 mod 3, we must add even digits d&f that sum up to 3 or 6 which is zero modulo three)

By #7 & #5, we have four possible patterns:
(1) a4c25816i
(2) a4c25896i
(3) a8c65432i
(4) a8c65472i

8. If b=4, which is 1 mod 3, then to make abc=0 mod 3, a&c must be {1,7} in some order. This rules out pattern (1) as a possible solution since it has g=1. So we must test the first seven digits of the two permutations of pattern (2)--1472589 & 7412589 to see if either is divisible by 7. Neither is. So pattern (2) is ruled out.

So b=8 and the solutions must be of the form of pattern (3) or (4). There remain only eight possible solutions for the remaining digits a,c & i using the unused odd numbers:
189654327
789654321
987654321
981654327
183654729
189654723
381654729
981654723
Chop off the last two digits of each and test them for divisibility by 7--only the number 3816547 works.
So 381654729 is the solution. As mentioned before, there's no need to test for divisibility by 9, since the sum of the digits 1--9=45 which is a multiple of 9 so abcdefghi=0 mod 9.

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.