JEE Main 2021 · 26 February · evening · Numerical answer · +4 / −0
The total number of 4-digit numbers whose greatest common divisor with 18 is 3, is _________.
Answer and solution
Answer 1000
Solution
Maths sir · 4 steps
Turn the gcd condition into a set: odd multiples of 3, minus those that are also multiples of 9.
- Read the condition. Since 18 = 2 × 3², gcd(n, 18) = 3 means n is divisible by 3, not divisible by 9, and not divisible by 2. So n must be an odd multiple of 3 that is not a multiple of 9.
- Odd multiples of 3. Let A be the set of odd multiples of 3. These are the numbers that leave remainder 3 on division by 6. The 4-digit ones run from 1005 to 9999, so n(A) = (9999 - 1005)/6 + 1 = 1500.
- Odd multiples of 9. Let B be the set of odd multiples of 9, a subset of A. These leave remainder 9 on division by 18. The 4-digit ones run from 1017 to 9999, so n(B) = (9999 - 1017)/18 + 1 = 500.
n(A - B) = n(A) - n(B) = 1500 - 500 = 1000
- So. Removing B from A leaves exactly the numbers whose gcd with 18 is 3. There are 1000 such 4-digit numbers.
The common slip: 2000. Ignoring the factor 2 and counting all multiples of 3 minus multiples of 9 gives 3000 - 1000 = 2000. That count includes even numbers like 1002, whose gcd with 18 is 6.
The idea to keep. For a gcd condition, factorise the fixed number. Each prime gives a rule: it must divide n to this power and no higher, or it must not divide n at all. Then count with set subtraction.
Answer from the NTA final answer key. Solution by PrepWiser.