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. P and Q walk along a circular track. They start at 5:00 a.m. from the same point in opposite directions. P walks at an average speed of 5 rounds per hour and Q walks at an average speed of 3 rounds per hour.
    How many times will they cross each other between 5:20 a.m. and 7:00 a.m.?

  2. A set (X) of 20 pipes can fill 70% of a tank in 14 minutes. Another set (Y) of 10 pipes fills 3/8 of the tank in 6 minutes. A third set (Z) of 16 pipes can empty half of the tank in 20 minutes. If half of the pipes of set X are closed and only half of the pipes of set Y are open, then how long will it take to fill 50% of the tank, if all pipes of set Z are open?

  3. The 5-digit number PQRST (all distinct digits) is such that T ≠ 0, P is thrice T. S is greater than Q by 4, while Q is greater than R by 3. How many such 5-digit numbers are possible?

  4. X can complete one-third of a certain work in 6 days, Y can complete one-third of the same work in 8 days and Z can complete three-fourth of the same work in 12 days. All of them work together for n days and then X and Z quit and Y alone finishes the remaining work in 82⁄3 days. What is n equal to?

  5. Consider a set of 11 numbers:

    Value-I = Minimum value of the average of the numbers of the set when they are consecutive integers ≥ -5.
    Value-II = Minimum value of the product of the numbers of the set when they are consecutive non-negative integers.

    Which one of the following is correct?

  6. The average of three numbers p, q and r is k. p is as much more than the average as q is less than the average. What is the value of r?

  7. What is X in the sequence:
    24, X, 12, 18, 36, 90 ?

  8. If P = +, Q = −, R = ×, S = ÷, then insert the proper notations between the successive numbers in the equation:
    60_15_3_20_4 = 20

  9. What is the remainder when 93 + 94 + 95 + 96 + ⋯ + 9100 is divided by 6?

  10. Let x be a real number between 0 and 1.
    Which of the following statements is/are correct?

    I. x² > x³
    II. x > √x

    select the correct answer using the code given below:


Important Questions from Miscellaneous Topics

  1. The cost of gold varies directly as the cube of its weight. A gold piece weighing 20 decigram costs ₹1,000. If it is broken into two pieces whose weights are in the ratio 2: 3, then what is the profit or loss incurred?
  2. The average age of the boys in a class is 12 years. The average age of the girls in the class is 11 years. There are 50% more girls than boys in the class. Which one of the following is the average age of the class (in years)?
  3. Consider the following figures : 

    Which of the following group(s) of figures fit/fits into the same class?
    1. (1,7,8)
    2. (4, 5, 6)
    3. (2, 3, 9)
    Select the correct answer using the code given below :

  4. What is clickjacking ?
  5. The National Council of Science Museums (NCSM), which is developing Science Centres/Museums/Innovation Hubs in India, works under
Need Expert Advice?
Upcoming Exams
UPSC SO Steno
December 12, 2026
Test Series
IAS img
UPSC
UPSC CSE (IAS) 2027 Prelims Mock Test Series
666 Tests 3 Tests Free
2351 Attempts
4.8(221)
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