Saturday, October 15, 2022

2022/065) Find the number of 3 digit numbers whose GCD with 36 is 2

 Let n ba me number.

now $36 = 2 ^ 2 * 3^2$

$gcd(n, 36) = 2$  means 2 is a facttor bf n but is is not a factor of n. and 3 is not a factor of it

So nwe take the multiple of 2 and remove from this mutipls of 4 and multiples of 6.

because we need to remove multiple of 3 so we need to remove multiple of 6 (as they are multiple of 2) 

To find the number of numbers 

the number of numbers which are mutilple of 2 = $\lfloor\frac{999}{2}\rfloor - \lfloor{99}{2}\rfloor = 449 - 49 = 500$

the number of numbers which are mutilple of 4 = $\lfloor\frac{999}{4}\rfloor - \lfloor{99}{4}\rfloor = 249 - 24 = 225$

the number of numbers which are mutilple of  6 = $\lfloor\frac{999}{6}\rfloor - \lfloor{99}{6}\rfloor 166  - 16 = 150$

multiple of 4 and 6 both contain multiples of 12(LCM of 4 and 6).

mutiples of 12 will be in both the lists that is multiple of 4 and 6.

the number of numbers which are mutilple of  12= $\lfloor\frac{999}{12}\rfloor - \lfloor{99}{12}\rfloor 83  - 8 = 75$

so number of mutiples of 4 and 6 are 225 + 150 -75 = 300

so number of numbers whose GCD with 36 =2 is 450 - 300 = 150





No comments: