# Thread: Finding the number of numbers with odd divisors

1. ## Finding the number of numbers with odd divisors

hi, if we have two natural numbers say a and b then how can one find the number of numbers between them which have exactly k number of divisors?
Here k is an odd number.
I know that we need to find the perfect squares between these limits but how to get those who have exactly k divisors?
E.g
if a =2 , b =49 and k = 3 then the ans = 3

2. Originally Posted by pranay
hi, if we have two natural numbers say a and b then how can one find the number of numbers between them which have exactly k number of divisors?
Here k is an odd number.
I know that we need to find the perfect squares between these limits but how to get those who have exactly k divisors?
E.g
if a =2 , b =49 and k = 3 then the ans = 3
for the particular example given it can be solved in the following way.

let a number $\displaystyle n=$p_1^$k_1$p_2^$k_2$....$\displaystyle$p_n^$k_n$ where $\displaystyle$p_i$'s are primes. then the number of divisors of n is$\displaystyle ($k_1+1)($k_2+1)$...$\displaystyle ($k_n+1)$
now here $\displaystyle ($k_1+1)($k_2+1)$...$\displaystyle ($k_n+1)$=3 so one of$\displaystyle $k_i+1$ is 3. this also means that only one of the $\displaystyle$k_i$is 2 and all others are 0. so n=$\displaystyle p^2$for some prime p; 2<n<49. the only$\displaystyle p\$'s which qualify for the above condition are 2,3 and 5.
so the there numbers are 4,9 and 25.