4. Determine all three-digit numbers with distinct digits that are divisible by 6 and whose sum of digits is divisible by 6. How many such numbers are there?
Problem 783
Official solution
4. Since , the required numbers must be divisible by both 2 and 3.
Since the sum of the digits of the required numbers is divisible by 6, the sum of the digits is also divisible by 3, which means they are divisible by 3.
To be divisible by 2, the unit digit must be or 8.
The sum of the digits of a three-digit number can be at most 27.
Since the sum of the digits of the required numbers is divisible by 6, the sum of the digits of the required numbers can be or 24.
If the sum is 6, the digits can be from the sets .
The required numbers are: 150, 510, 204, 240, 402, 420, 312, 132.
If the sum is 12, the digits can be from the sets ,
.
The required numbers are: , 156, 516, 246, 264, 426, 462, 624, 642, 354, 534.
If the sum is 18, the digits can be from the sets , .
The required numbers are: 198, 918, 792, 972, 396, 936, 594, 954, 378, 738, 468, 486, 648, 684, 846, 864, 576, 756.
If the sum is 24, the digits can be from the set .
The required numbers are: 798, 978.
The total number of required numbers is 54.