The Universe of Numbers
Imagine you are standing in front of a massive, infinite library. You are tasked with a specific mission: to count the four-digit numbers that are 'pure'—meaning they are not divisible by 3 and not divisible by 7.
At first glance, this feels like a daunting task. How do we count what isn't there? This is the beauty of set theory: we define our universe, identify the 'intruders,' and subtract them.
The Strategy
Inclusion-Exclusion
Let U be the set of all 4-digit numbers. We know that the smallest 4-digit number is 1000 and the largest is 9999.
The total count,
n(U), is calculated as:
n(U)=9999−1000+1=9000
Now, let A be the set of numbers divisible by 3, and B be the set of numbers divisible by 7. We want to find the numbers that are in neither A nor B. Mathematically, we are looking for n(Ac∩Bc).
By De Morgan's Law, this is equivalent to:
n(Ac∩Bc)=n(U)−n(A∪B)
The Engine
Arithmetic Progressions
To find
n(A∪B), we use the Principle of Inclusion-Exclusion:
n(A∪B)=n(A)+n(B)−n(A∩B)
For set
A, the first multiple of
3 after
1000 is
1002, and the last is
9999. Using the formula
l=a+(n−1)d, where
d=3:
9999=1002+(n−1)3⇒n(A)=3000
We repeat this for set
B (multiples of
7). The first multiple is
1001 and the last is
9996. Solving the progression:
9996=1001+(n−1)7⇒n(B)=1286
The Trap
Double Counting
If we simply add n(A) and n(B), we have counted the numbers divisible by both 3 and 7 twice. These are the multiples of their Least Common Multiple, LCM(3,7)=21.
We must find
n(A∩B). The first multiple of
21 is
1008, and the last is
9996:
9996=1008+(n−1)21⇒n(A∩B)=429
Now, we calculate the union:
n(A∪B)=3000+1286−429=3857
The Final Victory
We take our total universe of 9000 and subtract the 3857 numbers that are divisible by either 3 or 7.
The final count is:
9000−3857=5143
You have successfully navigated the logic of sets and sequences. Remember, in JEE Advanced, it is rarely about brute force; it is about the elegance of the method. The final answer is 5143.