All Exams Test series for 1 year @ ₹349 only
Question

Find the number of integers between $1$ and $150$ (inclusive) having $7$ as one of the digits but which are not divisible by $7$.

The correct answer is

$20$

Finding Integers with Digit 7 but Not Divisible by 7

This problem asks us to count the numbers between 1 and 150 (inclusive) that meet two conditions: they must contain the digit 7, and they must not be divisible by 7.

We can solve this by finding all the numbers with the digit 7 in the given range and then subtracting those that are also divisible by 7.

Step 1: Counting Integers with the Digit 7 (Range 1 to 150)

Let's find all the integers from 1 to 150 that have the digit 7 appearing in them.

  • Numbers with 7 in the units place: These are numbers ending in 7. In the range 1 to 150, they are: 7, 17, 27, 37, 47, 57, 67, 77, 87, 97, 107, 117, 127, 137, 147. There are 15 such numbers.
  • Numbers with 7 in the tens place: These are numbers from 70 to 79. In the range 1 to 150, they are: 70, 71, 72, 73, 74, 75, 76, 77, 78, 79. There are 10 such numbers.

Notice that the number 77 appears in both lists. To find the total count of unique integers containing the digit 7, we add the counts from both lists and subtract the count of numbers common to both lists (to avoid double-counting).

Total integers with digit 7 = (Numbers ending in 7) + (Numbers with 7 in tens place) - (Numbers counted twice)

Total = 15 + 10 - 1 = 24.

So, there are 24 integers between 1 and 150 that contain the digit 7.

The set of these integers is: $A = \{7, 17, 27, 37, 47, 57, 67, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 87, 97, 107, 117, 127, 137, 147\}$

Step 2: Counting Integers Divisible by 7 (Range 1 to 150)

Next, we find all the integers between 1 and 150 that are divisible by 7.

We can find this by dividing 150 by 7 and taking the floor of the result:

Number of multiples of 7 = $ \lfloor \frac{150}{7} \rfloor = \lfloor 21.42... \rfloor = 21 $.

The integers divisible by 7 in this range are: $B = \{7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84, 91, 98, 105, 112, 119, 126, 133, 140, 147\}$

Step 3: Identifying Integers with Digit 7 AND Divisible by 7

Now, we need to find the numbers that are common to both sets A (contains digit 7) and B (divisible by 7). We look for numbers in Set B that contain the digit 7.

By inspecting Set B:

  • 7 contains the digit 7.
  • 70 contains the digit 7.
  • 77 contains the digit 7.
  • 147 contains the digit 7.

The integers that have the digit 7 AND are divisible by 7 are: {7, 70, 77, 147}.

The count of such numbers is 4.

Step 4: Calculating Integers with Digit 7 but NOT Divisible by 7

Finally, to find the count of integers that have the digit 7 but are *not* divisible by 7, we subtract the count from Step 3 from the count in Step 1.

Required Count = (Total integers with digit 7) - (Integers with digit 7 AND divisible by 7)

Required Count = $ 24 - 4 = 20 $.

Conclusion: The Final Answer

Therefore, there are 20 integers between 1 and 150 (inclusive) that contain the digit 7 but are not divisible by 7.

This corresponds to option 2.

Was this answer helpful?

Important Questions from Integers

  1. How many three digit whole numbers are there between 75 and 405?

  2. Integers are listed from 700 to 1000. In how many integers is the sum of the digits 10 ?

  3. Using 2, 2, 3, 3, 3 as digits, how many distinct numbers greater than 30000 can be formed ?

  4. Consider the following statements :

    1. The sum of 5 consecutive integers can be 100.

    2 The product of three consecutive natural numbers can be equal to their sum.

    Which of the above statements is/are correct ? 

  5. The difference between a 2-digit number and the number obtained by interchanging the positions of the digits is 54.

    Consider the following statements:

    1. The sum of the two digits of the number can be determined only if the product of the two digits is known.

    2. The difference between the two digits of the number can be determined.

    Which of the above statements is/are correct?

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App