QlarIITy

MathematicsJEE Main 2023 · 1 FebruaryInteger

The number of 3-digit numbers, that are divisible by either 2 or 3 but not divisible by 7 is _____ .

Try it before you look.The full solution is on this page, below the answer box, the moment you check. No sign-in needed.

Solution

Core idea. A condition "or" is counted by inclusion and exclusion, and a further "but not" by removing a smaller union.

Concept refresher. For two sets, the number of elements in at least one of them is

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A \cup B| = |A| + |B| - |A \cap B|

The multiples of mm between two bounds form an A.P. with difference mm.

Picture the situation. Among the nine hundred three-digit numbers, half are even and a third are multiples of 3, with the multiples of 6 in both groups. From the union of those two groups the multiples of 7 have to be removed. A multiple of 7 inside the union is a multiple of 14 or of 21, and the multiples of 42 lie in both of those.

Approach. Count the union for two and three, then the union for fourteen and twenty-one, and subtract.

  1. Step 1: Divisible by 2 or 3

    Of the 900 three-digit numbers, 450 are divisible by 2, 300 by 3 and 150 by 6. So 450+300−150=600450 + 300 - 150 = 600 are divisible by 2 or 3.

  2. Step 2: Also divisible by 7

    These are the multiples of 14 or 21. The multiples of 14 run from 112 to 994, which is 64 numbers; those of 21 from 105 to 987, which is 43; those of 42 from 126 to 966, which is 21. So 64+43−21=8664 + 43 - 21 = 86 numbers are removed.

  3. Step 3: The count

    The required count is what remains of the 600 after these are removed, 600−86=514600 - 86 = 514.

Answer. 514

Sanity check. About one seventh of the 600 numbers should be removed, and 6007\dfrac{600}{7} is about 86, in agreement.

Common wrong answers

  • 472: Removing all 128 three-digit multiples of 7 gives 472; odd multiples of 7 that are not multiples of 3 were never counted.
  • 493: Not adding back the 21 multiples of 42 gives 600−107=493600 - 107 = 493.

Key takeaway

The trap. Only the multiples of seven that are inside the first count are removed.

How toppers think. They estimate the removed part as one seventh of the first count.

Remember. ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A \cup B| = |A| + |B| - |A \cap B|

More on Arithmetic Progression