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.
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