Finding the Count of Four-Digit Numbers Containing 5 or 7

Finding the Count of Four-Digit Numbers Containing 5 or 7

In this article, we will explore how to count the number of four-digit numbers that contain the digit 5 or 7 or both. We will use the principle of complementary counting to make this task easier and more systematic.

Step 1: Total Four-Digit Numbers

The total range of four-digit numbers is from 1000 to 9999. Therefore, the total count is:

9999 - 1000 9000

Step 2: Count Numbers Without 5 or 7

We will first count the four-digit numbers that do not contain the digits 5 or 7. To do this, we will identify the valid digits for each place value:

First digit (Thousands place): The first digit cannot be 0 and should not be 5 or 7. Valid digits: {1, 2, 3, 4, 6, 8, 9} rarr; 7 options. Second digit (Hundreds place): Valid digits: {0, 1, 2, 3, 4, 6, 8, 9} rarr; 8 options. Third digit (Tens place): Valid digits: {0, 1, 2, 3, 4, 6, 8, 9} rarr; 8 options. Fourth digit (Units place): Valid digits: {0, 1, 2, 3, 4, 6, 8, 9} rarr; 8 options.

The total number of four-digit numbers without the digits 5 or 7 is calculated as follows:

Total without 5 or 7 7 times; 8 times; 8 times; 8 7 times; 512 3584

Step 3: Total with 5 or 7

We can now find the total number of four-digit numbers that contain at least one of the digits 5 or 7 using complementary counting.

Total with 5 or 7 Total four-digit numbers - Total without 5 or 7

Total with 5 or 7 9000 - 3584 5416

Conclusion

Therefore, the total number of four-digit numbers that contain the digit 5 or 7 or both is 5416.

Counting Numbers Without 5 or 7

Alternatively, we can calculate the same result as follows:

Number of 4-digit integers that do not contain the digits 4 or 7 or both:

Thousand's digit chosen from {1, 2, 3, 5, 6, 8, 9} rarr; 7 choices. Hundred's digit chosen from {0, 1, 2, 3, 5, 6, 8, 9} rarr; 8 choices. Ten's digit chosen from {0, 1, 2, 3, 5, 6, 8, 9} rarr; 8 choices. Unit's digit chosen from {0, 1, 2, 3, 5, 6, 8, 9} rarr; 8 choices.

Total 7 times; 8 times; 8 times; 8 3584

Total 4-digit integers containing 5 or 7

Therefore, the total number of 4-digit integers containing 5 or 7 is:

Total 4-digit integers containing 5 or 7 Total four-digit numbers - Total without 5 or 7

Total 4-digit integers containing 5 or 7 9000 - 3584 5416