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?
If the number contains 0, then it has to be 0. To get a bigger number, it cannot contain 0.
Suppose it contains 5. Then, it cannot have any even digits because that would make it end in 0. Since it only has distinct odd digits, it has at most 5 digits. If we want a bigger number, then we should exclude 5.
The remaining digits (1, 2, 3, 4, 6, 7, 8, 9) add up to 40. If the number contains all of these digits, then it is not divisible by 3. Therefore, it has at most 7 digits. To get a 7-digit number divisible by 3, we can remove 1, 4, or 7. Therefore, we must include 9. The only way to get a 7-digit number divisible by 9 is to remove 4. Then, the number uses 1, 2, 3, 6, 7, 8, and 9. The biggest number with this property is 9867312.
|
Posted by Math Man
on 2014-10-13 13:48:08 |