Find the biggest integer N such that:
1. All its digits are distinct.
2. Each of these digits divides N.
Only a p&p solution requested.
Bonus: What would be the answer, if one of N"s digits were exempted from being its divider?
We start with a number that contains all 10 digits: 9876543210.
To be divisible by 8 we need to change the last 3 digits to 120.
Divisibility by 8 assures divisibility by 2 and 4. Divisibility by 5 is obvious. As the sum of digits is 45, it's divisible by 3, 6 and 9.
What's left is 7. The number is 3 mod 7.
We need to swap two digits in the hope of reducing this by 3. We can subtract 9 times a power of ten to swap two digits.
900 mod 7 is 4
9000 mod 7 is 5
90000 mod 7 is 1
900000 mod 7 is 3
We can subtract 900000, getting 9875643120.
Unfortunately we forgot one thing: it's not divisible by zero--nothing is; we can't have a zero, and therefore can't have a number that's divisible by both 2 and 5. So I've solved only the bonus, not the puzzle itself.
For the puzzle itself, since we can't have a number that's divisible by both 2 and 5, it's better to get rid of the 5, as 4 and 8 depend on the 2. It's hard for me to figure that without a computer.
Posted by Charlie
on 2014-10-13 08:57:02