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

Consider the first 100 natural numbers. How many of them are not divisible by any one of 2, 3, 5, 7 and 9?

The correct answer is

22

Understanding the Problem: Natural Numbers Not Divisible by Multiple Factors

The question asks us to find the count of natural numbers between 1 and 100 (inclusive) that are not divisible by any of the given numbers: 2, 3, 5, 7, and 9. This means we are looking for numbers that are simultaneously not divisible by 2, not divisible by 3, not divisible by 5, not divisible by 7, AND not divisible by 9.

Let's analyze the set of divisors: {2, 3, 5, 7, 9}. Notice that 9 is a multiple of 3. If a number is not divisible by 3, it cannot be divisible by 9. Therefore, the condition "not divisible by 3 AND not divisible by 9" is equivalent to simply "not divisible by 3". So, the list of unique divisibility conditions is simplified to "not divisible by 2, not divisible by 3, not divisible by 5, and not divisible by 7".

Thus, the problem is equivalent to finding the number of integers from 1 to 100 that are not divisible by any of the prime numbers 2, 3, 5, and 7.

Applying the Principle of Inclusion-Exclusion

To find the number of elements that satisfy none of the conditions (i.e., not divisible by any of 2, 3, 5, or 7), we can use the Principle of Inclusion-Exclusion. This principle helps us count the elements in the union of several sets. If we find the number of elements divisible by at least one of 2, 3, 5, or 7, we can subtract this from the total number of elements (100) to get the desired count.

Let N be the total number of natural numbers from 1 to 100, so N = 100.

Let A be the set of numbers in {1, ..., 100} divisible by 2.

Let B be the set of numbers in {1, ..., 100} divisible by 3.

Let C be the set of numbers in {1, ..., 100} divisible by 5.

Let D be the set of numbers in {1, ..., 100} divisible by 7.

We want to find N - $|A \cup B \cup C \cup D|$.

The formula for the Principle of Inclusion-Exclusion for four sets is:

$$|A \cup B \cup C \cup D| = \sum |Individual| - \sum |Pairwise Intersections| + \sum |Triple Intersections| - \sum |Quadruple Intersection|$$

Let's calculate each part.

Calculating Individual Divisibility Counts (Single Sets)

  • Numbers divisible by 2: $|A| = \lfloor 100/2 \rfloor = 50$
  • Numbers divisible by 3: $|B| = \lfloor 100/3 \rfloor = 33$
  • Numbers divisible by 5: $|C| = \lfloor 100/5 \rfloor = 20$
  • Numbers divisible by 7: $|D| = \lfloor 100/7 \rfloor = 14$

Sum of individual counts: $50 + 33 + 20 + 14 = 117$.

Calculating Pairwise Intersection Counts (Two Sets)

A number is divisible by two numbers if it is divisible by their least common multiple (LCM).

  • Divisible by 2 and 3 (LCM(2,3)=6): $|A \cap B| = \lfloor 100/6 \rfloor = 16$
  • Divisible by 2 and 5 (LCM(2,5)=10): $|A \cap C| = \lfloor 100/10 \rfloor = 10$
  • Divisible by 2 and 7 (LCM(2,7)=14): $|A \cap D| = \lfloor 100/14 \rfloor = 7$
  • Divisible by 3 and 5 (LCM(3,5)=15): $|B \cap C| = \lfloor 100/15 \rfloor = 6$
  • Divisible by 3 and 7 (LCM(3,7)=21): $|B \cap D| = \lfloor 100/21 \rfloor = 4$
  • Divisible by 5 and 7 (LCM(5,7)=35): $|C \cap D| = \lfloor 100/35 \rfloor = 2$

Sum of pairwise intersection counts: $16 + 10 + 7 + 6 + 4 + 2 = 45$.

Calculating Triple Intersection Counts (Three Sets)

  • Divisible by 2, 3, and 5 (LCM(2,3,5)=30): $|A \cap B \cap C| = \lfloor 100/30 \rfloor = 3$
  • Divisible by 2, 3, and 7 (LCM(2,3,7)=42): $|A \cap B \cap D| = \lfloor 100/42 \rfloor = 2$
  • Divisible by 2, 5, and 7 (LCM(2,5,7)=70): $|A \cap C \cap D| = \lfloor 100/70 \rfloor = 1$
  • Divisible by 3, 5, and 7 (LCM(3,5,7)=105): $|B \cap C \cap D| = \lfloor 100/105 \rfloor = 0$

Sum of triple intersection counts: $3 + 2 + 1 + 0 = 6$.

Calculating Quadruple Intersection Count (Four Sets)

  • Divisible by 2, 3, 5, and 7 (LCM(2,3,5,7)=210): $|A \cap B \cap C \cap D| = \lfloor 100/210 \rfloor = 0$

Sum of quadruple intersection counts: $0$.

Applying Inclusion-Exclusion Formula to Find Union Size

Now substitute the calculated values into the formula:

$$|A \cup B \cup C \cup D| = (117) - (45) + (6) - (0)$$

$$|A \cup B \cup C \cup D| = 117 - 45 + 6 = 72 + 6 = 78$$

This means 78 numbers between 1 and 100 are divisible by at least one of 2, 3, 5, or 7.

Finding Numbers Not Divisible by Any of the Factors

The number of integers from 1 to 100 that are not divisible by any of 2, 3, 5, or 7 is the total number of integers minus the number of integers divisible by at least one of them.

Number of desired integers = Total numbers - $|A \cup B \cup C \cup D|$

Number of desired integers = $100 - 78 = 22$.

Therefore, there are 22 natural numbers among the first 100 that are not divisible by any one of 2, 3, 5, 7, and 9.

Revision Table: Divisibility Counts (1-100)

Condition Count ($\lfloor 100/k \rfloor$)
Divisible by 2 50
Divisible by 3 33
Divisible by 5 20
Divisible by 7 14
Divisible by 6 (2 & 3) 16
Divisible by 10 (2 & 5) 10
Divisible by 14 (2 & 7) 7
Divisible by 15 (3 & 5) 6
Divisible by 21 (3 & 7) 4
Divisible by 35 (5 & 7) 2
Divisible by 30 (2, 3 & 5) 3
Divisible by 42 (2, 3 & 7) 2
Divisible by 70 (2, 5 & 7) 1
Divisible by 105 (3, 5 & 7) 0
Divisible by 210 (2, 3, 5 & 7) 0

Additional Information: Key Concepts in Number Theory

Least Common Multiple (LCM): The LCM of two or more integers is the smallest positive integer that is a multiple of all the integers. When finding numbers divisible by multiple factors, the count is determined by the LCM of those factors within the given range.

Principle of Inclusion-Exclusion: This is a counting technique used to find the number of elements in the union of multiple sets. It accounts for elements that are counted multiple times in the simple sum of individual set sizes by subtracting the sizes of pairwise intersections, adding back the sizes of triple intersections, and so on.

For two sets A and B: $|A \cup B| = |A| + |B| - |A \cap B|$.

For three sets A, B, and C: $|A \cup B \cup C| = |A| + |B| + |C| - (|A \cap B| + |A \cap C| + |B \cap C|) + |A \cap B \cap C|$.

The pattern extends for more sets, alternating between addition and subtraction of the sums of the sizes of intersections of increasing numbers of sets.

Was this answer helpful?

Similar Questions

  1. Which one of the following statements best reflects the critical message conveyed by the author of the passage?

  2. With reference to the above passage, the following assumptions have been made:
    I. No country needs to depend on ecosystems to boost national income.
    II. Resource-rich countries need to share their resources with those of scant resources so as to prevent the degradation of ecosystems.
    Which of the above assumptions is/are valid?

  3. Which one of the following statements best reflects the central idea of the passage?

  4. With reference to the above passage, the following assumptions have been made:
    I. Path-dependent green investments will eventually most likely benefit growth as well as public finances in a country like India.
    II. If other green technologies follow the same pattern as that of solar energy, there will most likely be an easy green transition.
    Which of the above assumptions is/are valid?

  5. Three prime numbers p, q and r, each less than 20, are such that p − q = q − r. How many distinct possible values can we get for (p + q + r)?

  6. How many possible values of (p + q + r) are there satisfying 1/p + 1/q + 1/r = 1, where p, q and r are natural numbers (not necessarily distinct)?

  7. What comes at X and Y respectively in the following sequence?
    January, January, December, October, X, March, October, Y, September

  8. Team X scored a total of N runs in 20 overs. Team Y tied the score in 10% less overs. Had Team Y’s average run rate (runs per over) been 50% higher, the scores would have been tied in 12 overs. How many runs were scored by Team X?

  9. The price (p) of a commodity is first increased by k%; then decreased by k%; again increased by k%; and again decreased by k%. If the new price is q, then what is the relation between p and q?

  10. Which one of the following statements best reflects the most logical, rational and pragmatic message conveyed by the author of the passage?


Important Questions from Miscellaneous Topics

  1. Which one of the following statements best reflects the critical message conveyed by the author of the passage?

  2. With reference to the above passage, the following assumptions have been made:
    I. No country needs to depend on ecosystems to boost national income.
    II. Resource-rich countries need to share their resources with those of scant resources so as to prevent the degradation of ecosystems.
    Which of the above assumptions is/are valid?

  3. Which one of the following statements best reflects the central idea of the passage?

  4. With reference to the above passage, the following assumptions have been made:
    I. Path-dependent green investments will eventually most likely benefit growth as well as public finances in a country like India.
    II. If other green technologies follow the same pattern as that of solar energy, there will most likely be an easy green transition.
    Which of the above assumptions is/are valid?

  5. Three prime numbers p, q and r, each less than 20, are such that p − q = q − r. How many distinct possible values can we get for (p + q + r)?

Need Expert Advice?
Upcoming Exams
UPSC CMS
August 02, 2026
IAS Exam
August 21, 2026
UPSC SO Steno
December 12, 2026
Test Series
IAS img
UPSC
UPSC CSE (IAS) 2027 Prelims Mock Test Series
654 Tests 3 Tests Free
680 Attempts
4.8(182)
English, Hindi

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