## [Soln] 2013 Singapore MO (Junior Rd 1) Problem 28

2013 SMO (Junior-Rd1) 28. How many 4-digit positive multiples of 4 can be formed from the digits 0, 1, 2, 3, 4, 5, 6 such that each digit appears without repetition?

The divisibility test for 4 is as follows: A number is divisible by 4 if and only if the last 2 digits are divisible by 4. Using this as a starting point, we can list out a whole bunch of cases:

Case 1: The number ends in 0.
In order to fulfill the divisibility test, the 2nd last digit must be 2, 4 or 6 (0 cannot be used since each digit appears without repetition):

That gives us 3 options for the 2nd last digit. How many choices do we have for the 1st 2 digits? Since we can only use numbers from 0 to 6 (inclusive) and 2 of them have already been used, we have 7-2=5 options for the 1st digit and 4 options for the 2nd digit. Hence, there are a total of 3 × 5 × 4 = 60 numbers ending in 0 which meet the given conditions.

Case 2: The number ends in 2.
To fulfill the divisibility test, the 2nd last digit must be 1, 3 or 5:

That gives us 3 options for the 2nd last digit. How about the 1st 2 digits? Here we have to be slightly more careful since 0 is still one of the remaining numbers we can use. 0 can be the 2nd digit but not the 1st digit!

Consider the 1st digit. It can’t be 2, it can’t be one of {1,3,5}, and it can’t be zero. Hence, there are 4 options for it. For the 2nd digit, it can’t be 2, it can’t be one of {1,3,5}, and it can’t be the 1st digit. Hence, there are also 4 options for it.

In summary, there are a total of 3 × 4 × 4 = 48 numbers ending in 2 which meet the given conditions.

Case 3: The number ends in 4.
This is case is probably the most complicated one. To be divisible by 4, the 2nd last digit must be 0, 2 or 6:

Based on the preceding cases, we know that whether 0 is used in the last 2 digits or not affects how many choices there are for the first 2 digits. Hence, it would be best to consider the case where 0 is the 2nd last digit separately.

Case 3.1: The number ends in 04. Then as in case 1, there are 5 × 4 = 20 choices for the 1st 2 digits.
Case 3.2: The number ends in 24 or 64. Then as in case 2, there are 4 × 4 = 16 choices for the 1st 2 digits.

Thus in total, there are 20 + 16 + 16 = 52 numbers ending in 4 which satisfy the conditions.

Case 4: The number ends in 6.
The details for this case are exactly the same as case 2, so there are a total of 48 numbers here.

Adding all this together, the desired answer is 60 + 48 + 52 + 48 = 208.