Monday, August 13, 2012

How many numbers have exactly 15 divisors till 10000

a number of the form p1^a1 * p2^a2 * p3^a3 ... (p1 , p2, p3 etc are distinct primes ) has number of factors

(a1+1)(a2+1)(a3+1) ....

now we need to factor 15 in as many ways we can ( 15 * 1 or 3 * 5)

15 *1 -> a1 = 14

but 2^14 is 16384 > 10000 so no solution

now case 3 * 5

so a1 = 2, a2 = 4

so number n is of the form = p1^4 p2^2 where p1 and p2 are primes and p1 is not p2 ( it is convenient to keep power in decreasing order so to have lesser computations

p1^2 p2^4 < = 10^ 4

p1 = 2 => p2^2 <= 625 or p2 < 25 that is p2 = 3, 5 , 7, 11,13, 17,19, 23

p1 =3 => p2^2 < 123 or p2 <= 11 that is p2 =2, 5,7, 11
p1 = 5 => p2^2 < 16 or p2 = 2 or 3

p1 = 7=> p^2 <= 4 or p2 = 2

p1 = 11 => p1^4 > 10^4 not possible

so the numbers are

2^4q^2 where q in 3, 5 , 7, 11,13, 17,19, 23 ( 8 numbers)
or 3^4 q^2 where q in 2. 5,7, 11( 4 numbers)
5^4 * 2^2 or 5^2 * 3^2 or 7^4 *2^2 ( 3 numbers) that is 15 numbers

No comments: