Find the minimum positive integer N containing each of the digits from 1 to 9 exactly once such that N is divisible by 99.
Any number that contains each of the digits from 1 to 9 exactly once will be divisible by 9. So the problem is to find N such that N is divisible by 11.
The test for divisibility by 11 is to sum every second digit and subtract the sum of all the other digits; if the difference is 0 mod 11 then so is N. Note that other than this grouping, order doesn't matter.
When N contains each digit from 1 to 9 exactly once, the difference between these sums will always be odd. So we're looking to group the digits such that the difference of their sums is + or  11, so the sums will be 17 and 28.
We can make 17 with (2,4,5,6) so ordering everything from least to greatest would make N = 123475869 = 1247231 * 99.
It seems to me that would be the minimum solution.

Posted by tomarken
on 20140611 14:03:44 