Let N be the four digit number GCD (N,18) = 3 Hence N is an odd integer which is divisible by 3 but not by 9.
4 digit odd multiples of 3 are 1005, 1011,......., 9999 → 1500
4 digit odd multiples of 9 are 1017, 1035,......., 9999 → 500
Hence number of such N = 1000