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

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?

• Do you have to use every number?
– user223391
Oct 10, 2015 at 14:42
• Can a number have repeated digits Oct 10, 2015 at 14:55
• Infinitely many. To put it differently: You have to formulate your problem more precisely. Oct 10, 2015 at 15:04
• @user118494 No, A number cannot have repeated digits. Oct 10, 2015 at 15:41

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.

the number should be divisible by 2 and 3.

case.1)

XY2

then X+Y should be 4,7.

a) X+Y=4

the only possibility is (X,Y)=(1,3). Then there are 2 choices (X,Y) = (1,3) or (3,1).

b) X+Y=7

(X,Y) = (2,5), which is not feasible, or (X,Y) =(3,4). the number of choices here is 2, then.

case.2) XY4

then X+Y can be 5,8.

a) X+Y=5

(X,Y) = (1,4), which is not feasible (4 is already taken), or (X,Y) = (2,3) , then 2 choices here.

b) X+Y = 8

(X,Y) = (3,5), and 2 choices here.

then the total number of choices is 2+2+2+2 =8.

You have three sets {1,4}{2,5}{3}. For the exactly one from each set case, you already have the answer which is ${2\choose1}{1\choose1}2!+{2\choose1}{1\choose1}2!=8$.

For the one from first and one from second case, you have ${2\choose1}+{2\choose1}=4$

For the two from first and two from second case, you have $3!+3!=12$

For the five numbers case, you have $4!+4!=48$

These are all the possible cases, hence totally 72 numbers.