[Math] How many numbers of can by formed by using the digits $1,2,3,4$ and $5$ without repetition which are divisible by $6$

permutations

How many numbers can by formed by using the digits $1,2,3,4$ and $5$ without repetition which are divisible by $6$?

My Approach:

$3$ digit numbers formed using $1,2,3,4,5$ divisible by $6$

unit digit should be $2/4$

No. can be $XY2$ & $XY4$

$X+Y+2 = 6,9$ & $X+Y+4 = 9,12$

$X+Y = 4,7$ & $X+Y = 5,8$

$(X,Y)= (1,3),(3,1),(2,5),(5,2)$ &

$(X,Y)= (2,3),(3,2),(3,5),(5,3)$

Therefore,Total 8 numbers without repetition.

But I am confused here how to find numbers of numbers?

Best Answer

For a number to be divisible by $6$, it must be divisible by both $2$ and $3$. If it is divisible by $2$, it must be even, so the units digit must be $2$ or $4$. If it is divisible by $3$, the sum of its digits must be divisible by $3$.

The only one-digit positive integer that is divisible by $6$ is $6$ itself, so the number must have at least two digits.

Two-digit numbers: If the units digit is $2$, the tens digit must have remainder $1$ when divided by $3$. Hence, the tens digit must be $1$ or $4$.

If the units digit is $4$, the tens digit have remainder $2$ when divided by $3$. Hence, the tens digit must be $2$ or $5$.

Therefore, there are four two-digit numbers divisible by $6$ that can be formed using the digits $1, 2, 3, 4, 5$ without repetition. They are $12$, $24$, $42$, $54$.

Three-digit numbers: If the units digit is $2$, the sum of the hundreds digit and tens digit must have remainder $1$ when divided by $3$. Since the sum of the hundreds digit and tens digit must be at least $1 + 3 = 4$ and at most $5 + 4 = 9$, the only possibilities are that the sum of the hundreds digit and tens digit is $4$ or $7$. Since digits cannot be repeated, the only way to obtain $4$ is to use the digits $1$ and $3$ in either order, and the only way to obtain $7$ is to use the digits $3$ and $4$ in either order. Hence, there are four three-digit numbers divisible by $6$ that can be formed with the digits $1, 2, 3, 4, 5$ that have units digit $2$. They are $132$, $312$, $342$, and $432$.

If the units digit is $4$, then the sum of the hundreds digit and tens digit must have remainder $2$ when divided by $3$. Since the sum of the hundreds digit and tens digit must be at least $1 + 2 = 3$ and at most $3 + 5 = 8$, the sum of the hundreds digit and tens digit must be $5$ or $8$. Since digits cannot be repeated, the only way to obtain $5$ is to use the digits $2$ and $3$ in either order, and the only way to obtain $8$ is to use the digits $3$ and $5$ in either order. Hence, there are also four three-digit numbers divisible by $6$ that can be formed with the digits $1, 2, 3, 4, 5$ that have units digit $4$. They are $234$, $324$, $354$, $534$.

Therefore, there are a total of eight three-digit numbers divisible by $6$ that can be formed from the digits $1, 2, 3, 4, 5$ without repetition.

Four-digit numbers: If the units digit is $2$, then the sum of the thousands digit, hundreds digit, and tens digit must have remainder $1$ when divided by $3$. Since the sum of the thousands digit, hundreds digit, and tens digit must be at least $1 + 3 + 4 = 8$ and at most $3 + 4 + 5 = 12$, the sum of the thousands digit, hundreds digit, and tens digit must be $10$. Since digits cannot be repeated, the only way to obtain a sum of $10$ is to use the digits $1$, $4$, and $5$ in some order. There are $3! = 6$ such orders. Hence, there are six four-digit numbers divisible by $6$ with units digit $2$ that can be formed from the digits $1, 2, 3, 4, 5$ without repetition. They are $1452$, $1542$, $4152$, $4512$, $5142$, and $5412$.

If the units digit is $4$, the remainder of the sum of the thousands digit, hundreds digit, and tens digit must be $2$ when divided by $3$. Since the sum of the thousands digit, hundreds digit, and tens digit must be at least $1 + 2 + 3 = 6$ and at most $2 + 3 + 5 = 10$, the sum of the thousands digit, hundreds digit, and tens digit must be $8$. Since digits cannot be repeated, the only way to obtain a sum of $8$ is to use the digits $1$, $2$, and $5$ in some order. Since there are $3! = 6$ such orders, there are also six four-digit numbers that can be formed from the digits $1, 2, 3, 4, 5$ without repetition. They are $1254$, $1524$, $2154$, $2514$, $5124$, and $5214$.

Hence, there are a total of $12$ four-digit numbers divisible by $6$ that can be formed from the digits $1, 2, 3, 4, 5$ without repetition.

Five-digit numbers: The sum of the five digits $1, 2, 3, 4, 5$ is $15$, which is divisible by $3$. Hence, any five digit number formed from these digits without repetition that has units digit $2$ or $4$ is divisible by $6$. There are two ways of filling the units digit and $4!$ ways of filling the remaining digits. Hence, there are $2 \cdot 4! = 48$ five-digit numbers that can be formed with the digits $1, 2, 3, 4, 5$ without repetition.

In total, there are $4 + 8 + 12 + 48 = 72$ numbers divisible by $6$ that can be formed from the digits $1, 2, 3, 4, 5$ without repetition.