Solveeit Logo

Question

Question: Find the number of 4-digit numbers (in base 10) having non-zero digits and which are divisible by 4 ...

Find the number of 4-digit numbers (in base 10) having non-zero digits and which are divisible by 4 but not by 8.

Explanation

Solution

In this question, we get to know that the number is divisible by 4 only if its last digit is 2, 4, 6, and 8 which gives the four cases. Then, one by one considering the number with ending 2, 4, 6, and 8, we get the conditions for the divisible by 4 and not divisible by 8. Then, by adding all the cases obtained, we get the required number of cases.

Complete step-by-step solution
Firstly, we know that a four-digit number can be divided by 4 only when the last digits will be 2, 4, 6, and 8. So, by solving for each case separately, and then totaling the entire number of ways in which number is divisible by 4 and not by 8.
Case 1:
Now, we will start with the numbers that are ending with 2 and we already know that a number is divisible by 4 if the last two digits of the number are divisible by 4 and also the second digit from the right should be odd to get completely divided by 4.
So, we get the numbers that are completely divisible by 4 as 12, 92, 52, 32, and 72.
Then, we already know that a number is divisible by 8 if the last 3 digits are divisible by 8.
Now, if we check the numbers as 12, 52, and 92 then we come to a conclusion that for these numbers not to be divisible by 8 needs an even digit at the starting of the number before two digits.
As we need to find the 4 digit numbers the leftmost digit can be any non- zero number which has 9 ways and the third digit from right to be even there are four numbers that are 2, 4, 6, and 8 which gives four cases.
Now, the total number of ways satisfying the above condition is given by

& 9\times 4\times 3 \\\ & \Rightarrow 108 \\\ \end{aligned}$$ Alternatively, if we check the numbers as 32 and 72 then we came to a conclusion that for these numbers not to be divisible by 8 needs an odd digit at the starting of the number before two digits. Here, the odd digit can be five numbers as 1, 3, 5, 7, or 9 gives 5 cases and non zero leftmost digits has 9 ways. So, the total number of ways is given by $$\begin{aligned} & 9\times 5\times 2 \\\ & \Rightarrow 90 \\\ \end{aligned}$$ So, by adding the obtained number of cases above for the 4 digit numbers ending with 2 that are divisible by 4 but not by 8, we get: $$\begin{aligned} & 108+90 \\\ & \Rightarrow 198 \\\ \end{aligned}$$ Case 2: Now, we will continue with the numbers that are ending with 4 and we already know that a number is divisible by 4 if the last two digits of the number are divisible by 4 and also the second digit from the right should be even to get completely divided by 4. So, we get the numbers that are completely divisible by 4 as 64, 84, 44, and 24. Now, if we check the numbers as 64 and 24 then we came to a conclusion that for these numbers not to be divisible by 8 needs an odd digit at the starting of the number before two digits. Here, the odd digit can be five numbers as 1, 3, 5, 7, or 9 gives 5 cases and non zero leftmost digits has 9 ways. So, the total number of ways is given by $$\begin{aligned} & 9\times 5\times 2 \\\ & \Rightarrow 90 \\\ \end{aligned}$$ Now, the numbers ending with 84 and 44 to be not divisible by 8 should have even previous digit $$\begin{aligned} & 9\times 4\times 2 \\\ & \Rightarrow 72 \\\ \end{aligned}$$ So, by adding the obtained number of cases above for the 4 digit numbers ending with 2 that are divisible by 4 but not by 8, we get: $$\begin{aligned} & 72+90 \\\ & \Rightarrow 162 \\\ \end{aligned}$$ Case 3: Now, we will continue with the numbers that are ending with 6 and we already know that a number is divisible by 4 if the last two digits of the number are divisible by 4 and also the second digit from the right should be even to get completely divided by 4. So, we get the numbers that are completely divisible by 4 as 56, 96, 76, 36, and 16. For numbers ending with 36 and 76, the previous digit should be even to get these numbers not divisible by 8. So, we get the number of cases for this case as: $$\begin{aligned} & \left( 9\times 4\times 2 \right) \\\ & \Rightarrow 72 \\\ \end{aligned}$$ Similarly, for the numbers that are remaining as 16, 56 and 96, we get the fact the leftmost digit is odd to get a number not divisible by 8. So, we get the number of cases for this case as: $$\begin{aligned} & \left( 9\times 5\times 3 \right) \\\ & \Rightarrow 135 \\\ \end{aligned}$$ Now, the total cases for the numbers ending with 6 to be divisible by 4 and not by 8 is given by $$\begin{aligned} & 135+72 \\\ & \Rightarrow 207 \\\ \end{aligned}$$ Case 4: Now, we will continue with the numbers that are ending with 4 and we already know that a number is divisible by 4 if the last two digits of the number are divisible by 4 and also the second digit from the right should be even to get completely divided by 4. So, we get the numbers that are completely divisible by 4 as 68, 48, 28, and 88. So, we get to know that it follows the same property which last digit ending with 4 follows and we get the total vases for this as 162. Now, to get the total number of 4 digit numbers that are divisible by 4 but not by 8, we will add all the above total cases and get the answer as: $$\begin{aligned} & 198+162+162+207 \\\ & \Rightarrow 729 \\\ \end{aligned}$$ **Hence, there are 729 4 digit numbers divisible by 4 but not by 8.** **Note:** Instead of considering the digits to be odd or even to be divisible by a particular number we can also find them by listing all of those possible numbers but it will be a bit lengthy and confusing and not preferable. It is important to note that for any number to be divisible by 4 the last digit should be even anyway so we consider only those numbers ending with even numbers. It is also to be noted that the number to be divisible or not divisible depends on the third digit from the right which has different causes for different last 2 digits.