# Finding the number of numbers with odd divisors

• Jan 16th 2011, 04:23 AM
pranay
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
• Jan 16th 2011, 05:05 AM
abhishekkgp
Quote:

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