N should be expressed only as the product of its prime factors to calculate the number of factors.
N = 45^2 = 3^4*5^2
number of factors = 5*3 = 15 not a prime number.
So, N cannot be 45^2. like wise for many other numbers that you have considered.
m+1 = 3 => m = 2 => N = 2^2, 3^2, 5^2, 7^2, 11^2, 13^2, 17^2, 19^2, 23^2, 29^2, 31^2, 37^2, 41^2, 43^2 => 14 numbers
m+1 = 5 => m = 4 => N = 2^4,3^4,5^4 => 3 numbers
m+1 = 7 => m = 6 => N = 2^6 , 3^6 => 2 numbers
m+1 = 11 => m = 10 => N = 2^10 => 1 numbers
My bad. I got carried away. Here is the modified solution:
If a number expressed as a product of its prime factors is 2^m * 3^n....., then the number of factors is (m+1)(n+1)...
=> if the number of factors is prime, then (m+1)(n+1)... is prime
=> There is only one prime factor of the number with a power m such that:
(m+1) is prime
m+1 = 2 => m = 1 => N is prime. Do not consider as we have to count only composite numbers.
m+1 = 3 => m = 2 => N = 2^2 to 45^2 (in the given range)
Considering only the primes from 2 to 45: 2,3,5,7,11,13,17,19,23,29,31,37,41,43 => 14 numbers.
m+1 = 5 => m = 4 => N = 2^4 to 6^4 (in the given range)
Considering only the primes from 2 to 6: 2,3,5 => 3 numbers
m+1 = 7 => m = 6 => N = 2^6 to 3^6 (in the given range) => 2 numbers
m+1 = 11 => m = 10 => N = 2^10 (in the given range) => 1 numbers
Total = 14 + 3 + 2 + 1 = 20 numbers. I hope this is correct.