Solveeit Logo

Question

Question: All possible 5 digit numbers each having 5 distinct digits are formed using digits 1,2,3,5,6,8 . Amo...

All possible 5 digit numbers each having 5 distinct digits are formed using digits 1,2,3,5,6,8 . Among them, the number of numbers which are divisible by 3 but not by 6 is

Answer

48

Explanation

Solution

The given digits are {1, 2, 3, 5, 6, 8}. We need to form 5-digit numbers using 5 distinct digits from this set.

A number is divisible by 3 if the sum of its digits is divisible by 3. A number is divisible by 6 if it is divisible by both 2 and 3. We are looking for numbers that are divisible by 3 but not by 6. This means the number must be divisible by 3 and not divisible by 2. A number is not divisible by 2 if its last digit is odd.

First, let's find the sets of 5 distinct digits from {1, 2, 3, 5, 6, 8} whose sum is divisible by 3. The sum of all 6 digits is 1+2+3+5+6+8=251 + 2 + 3 + 5 + 6 + 8 = 25. If we choose 5 digits, we are leaving one digit out. Let the digit left out be xx. The sum of the 5 chosen digits is 25x25 - x. For the sum of the 5 digits to be divisible by 3, 25x25 - x must be divisible by 3. Since 251(mod3)25 \equiv 1 \pmod{3}, we have 1x0(mod3)1 - x \equiv 0 \pmod{3}, which means x1(mod3)x \equiv 1 \pmod{3}. The digits in the set {1, 2, 3, 5, 6, 8} and their remainders modulo 3 are:

11(mod3)1 \equiv 1 \pmod{3} 22(mod3)2 \equiv 2 \pmod{3} 30(mod3)3 \equiv 0 \pmod{3} 52(mod3)5 \equiv 2 \pmod{3} 60(mod3)6 \equiv 0 \pmod{3} 82(mod3)8 \equiv 2 \pmod{3}

The only digit in the set that is congruent to 1 modulo 3 is 1. Therefore, the only digit that can be left out is 1. The set of 5 digits must be {2, 3, 5, 6, 8}. The sum of these digits is 2+3+5+6+8=242+3+5+6+8 = 24, which is divisible by 3. Any number formed using these 5 distinct digits will have a sum of digits equal to 24, and thus will be divisible by 3.

Now we need to form 5-digit numbers using the digits {2, 3, 5, 6, 8} such that the number is divisible by 3 (which is guaranteed) but not by 6. For a number to be not divisible by 6, it must not be divisible by 2 (since it is already divisible by 3). A number is not divisible by 2 if its last digit is odd. The digits available are {2, 3, 5, 6, 8}. The odd digits in this set are {3, 5}. Let the 5-digit number be d1d2d3d4d5d_1 d_2 d_3 d_4 d_5. The digits d1,d2,d3,d4,d5d_1, d_2, d_3, d_4, d_5 are a permutation of {2, 3, 5, 6, 8}. For the number to be not divisible by 2, the last digit d5d_5 must be odd. So, d5d_5 can be 3 or 5.

Case 1: The last digit is 3 (d5=3d_5 = 3). The set of digits is {2, 3, 5, 6, 8}. The last digit is fixed as 3. The remaining 4 digits {2, 5, 6, 8} must be arranged in the first four positions (d1d2d3d4d_1 d_2 d_3 d_4). The number of ways to arrange these 4 distinct digits is 4!4!. 4!=4×3×2×1=244! = 4 \times 3 \times 2 \times 1 = 24. So, there are 24 numbers ending in 3. These numbers use the digits {2, 5, 6, 8, 3}, whose sum is 24, so they are divisible by 3. Since the last digit is 3 (odd), they are not divisible by 2. Thus, they are divisible by 3 but not by 6.

Case 2: The last digit is 5 (d5=5d_5 = 5). The set of digits is {2, 3, 5, 6, 8}. The last digit is fixed as 5. The remaining 4 digits {2, 3, 6, 8} must be arranged in the first four positions (d1d2d3d4d_1 d_2 d_3 d_4). The number of ways to arrange these 4 distinct digits is 4!4!. 4!=4×3×2×1=244! = 4 \times 3 \times 2 \times 1 = 24. So, there are 24 numbers ending in 5. These numbers use the digits {2, 3, 6, 8, 5}, whose sum is 24, so they are divisible by 3. Since the last digit is 5 (odd), they are not divisible by 2. Thus, they are divisible by 3 but not by 6.

The total number of 5-digit numbers formed using distinct digits from {1, 2, 3, 5, 6, 8} that are divisible by 3 but not by 6 is the sum of the numbers from Case 1 and Case 2. Total number = 24+24=4824 + 24 = 48.