An interesting GMAT problem solving practice question that combines two topics – counting methods and elementary number properties related to divisibility of numbers by 4.

### Question

How many five digit positive integers comprising only the digits 1, 2, 3, and 4, each appearing at least once, exist such that the number is divisible by 4?

- 120
- 24
- 72
- 60
- 54

### Correct Answer

Choice D. 60 such 5-digit numbers can be formed.

### Explanatory Answer

**What is to be computed?**

We have to find the number of 5-digit numbers that can be formed using the digits 1, 2, 3 and 4.

**Conditions to be met**

- Each of the digits 1, 2, 3, and 4 should appear at least once in all the numbers formed.
- The numbers should be divisible by 4.

#### Next relevant question – what is the test of divisibility by 4?

A number is divisible by 4, if the last two digits (the rightmost two digits) of the number are divisible by 4.

Ever wondered why checking whether the last 2 digits are divisible by 4 will suffice?

#### What are the possible values for the last two digits if the number is divisible by 4 and is made of the digits 1,2, 3, and 4?

The last two digits can be 12, 24, 32, and 44.

Let us now compute the number of 5-digit numbers that can be formed for each of these scenarios.

Case 1: **Ending with 12:**

(a) The first three digits can be 2, 3, and 4. These 3 digits can rearrange in 3! = 6 ways

(b) The first three digits can be 1, 3, and 4. These 3 digits can rearrange in 3! = 6 ways

(c) The first three digits can be 3, 3, and 4. These 3 digits can rearrange in 3!/2! = 3 ways

(d) The first three digits can be 3, 4, and 4. These 3 digits can rearrange in 3!/2! = 3 ways

Total = 6 + 6 + 3 + 3 = 18 ways.

**Note**: We have to ensure that all 4 numbers 1, 2, 3, and 4 feature at least once in the numbers.

Case 2: **Ending in 24:**

Similar to case 1: 18 ways

Case 3: **Ending in 32:**

Similar to cases 1 and 2: 18 ways

Case 4: **Ending in 44:**

The first 3 digits have to be 1, 2, and 3 because we have to use each of the digits at least once in the numbers.

These 3 distinct digits can rearrange in 3! = 6 ways.

Total number of numbers that can be formed = 18 + 18 + 18 + 6 = 60.

The trap in this question is that we may extrapolate at the end of the case 1 that we will have 18 possibilities for each of the 4 cases and rush to mark 72 as the total number of numbers.

## Queries, answers, comments welcome