Question:

The total number of 4-digit numbers whose greatest common divisor with 18 is 3, is _________.

Show Hint

gcd(n,18)=3 means n is divisible by 3, odd, and not divisible by 9; count using residues mod 6 and mod 18.
Updated On: Nov 4, 2026
Show Solution
collegedunia
Verified By Collegedunia

Correct Answer: 1000

Solution and Explanation

\(\gcd(n,18)=3\) with \(18=2\cdot3^2\) means: \(3\mid n\), \(n\) is odd, and \(9\nmid n\).
4-digit odd multiples of 3 are numbers \(\equiv3\pmod 6\): \(1005,1011,\dots,9999\). Count \(=\frac{9999-1005}{6}+1=1500\).
Among them, the odd multiples of 9 are \(\equiv9\pmod{18}\): \(1017,1035,\dots,9999\). Count \(=\frac{9999-1017}{18}+1=500\).
Required count \(=1500-500=1000\).
Answer: 1000
Was this answer helpful?
0
0