Since N is 45 * the product of its digits, N is both a multiple of 5 and a multiple of 9.
Since N is a muliple of 5, it's final digit is 0 or 5. But it can't be 0 or else the product of digits would be 0 and N itself would have to be 0, which is not a 5-digit number. So the final digit is 5.
N, then = 9*25*(product of first 4 digits). Also, N is odd since the last digit is 5. Therefore all of the remaining digits must also be odd or the product would be even.
N is also a multiple of 25, not just 5, and all odd multiples of 25 end in either "25" or "75". Since none of the digits are even, the 4th digit must be 7. N, then is equal to 9*7*25*(product of the first 3 digits).
Now, since N is a multiple of 9, the sum of its digits must be a multiple of 9. Since 7+5 = 3 mod 9, the first 3 digits must sum to 6 mod 9. But since all three digits are odd, their sum is also odd. The first odd number = 6 mod 9 is 15, and the next is 33, which is bigger than 9*3 and so an impossible sum for 3 digits. So these digits must sum to 15.
Also, 25*7*9 = 1575, and 64*1575 > 99999 so the product of the 3 remaining digits must be less than 64.
There are 5 possible sums: 9+5+1, 9+3+3, 7+7+1, 7+5+3, and 5+5+5. Right away we can eliminate (9,3,3), (7,5,3), and (5,5,5) as these all have products bigger than 64. That leaves only two possibilities to check manually. 9,5,1 gives a 5-digit number (70875) but it's got a zero so that's impossible. Only 7,7,1 remains, and its product times 45 is 77175 which indeed has the required properties.
77,175 is therefore the only possible solution.
|
Posted by Paul
on 2013-10-28 15:14:24 |