All composite numbers can be factored into prime numbers:
N=(p₁^a₁)(p₂^a₂)...(pᵣ^aᵣ) where each p is a different prime number>1, and each a is a power of that prime number. The a values are greater than zero and not necessarily unique, so we could have a₁=a₃, for example.
The number of factors is the product (a₁+1)(a₂+1)...(aᵣ+1) and the factors include 1 and N. So if the number of factors is 24, this product is 24. The factors of 24=2³×3, so the number of factors should be (3+1)(1+1)=8. Let’s see if that’s right: 1, 2, 3, 4, 6, 8, 12, 24–8 factors including 1 and 24 itself.
We can exclude 1, because we can’t have an aᵣ+1=1, which would give us aᵣ=0.
We can also exclude 24 which would give us an aᵣ of 23 and no other factors! So we could have an aᵣ=1 so that aᵣ+1=2. The product of the other aᵣ+1 values would have to be 12, so we could have N=p₁p₂¹¹, p₁p₂²p₃³, p₁²p₂p₃p₄, p₁³p₂⁵, etc.
We can also range the p values in order of size from least to greatest, so p₁<p₂<p₃ etc.
The product of the prime factors will be p₁p₂p₃... regardless of the powers.
Part of this is question is a little obscure, because it needs a ratio of the smallest and larger number and the square root must be rational since prime numbers are integers. We are left to guess why there are two numbers, rather than one. Could it be that we have to find the largest and smallest numbers made up of the same group of prime numbers?
Let’s look at the factors of 24 and group them into twos, threes and fours:
Twos: (2,12) (3,8) (4,6) implying N=p₁p₂¹¹, p₁²p₂⁷, p₁³p₂⁵
Threes: (2,2,6) (2,3,4) implying N=p₁p₂p₃⁵, p₁p₂²p₃³
Fours: (2,2,2,3) implying N=p₁p₂p₃p₄².
If we need to work out a smaller and larger value for N the smaller one will contain p₁ with the highest power and the largest prime with the smallest power. The ratio may be the larger divided by the smaller, and it must have a rational square root>1. But even if we can find two such numbers, which one would be the solution to the problem, which seems to require only one number?
The only useful ratios are ones that are perfect squares so that the square root is rational. This requires the difference between the largest and smallest powers to be an even number, so we have N=p₁p₂¹¹, p₁³p₂⁵, p₁p₂p₃⁵, p₁p₂²p₃³ giving us the square root of the ratios: (p₂/p₁)⁵, p₂/p₁, (p₃/p₁)², p₃/p₁. But now there’s another problem. The product of the prime factors for each of these is: p₁p₂, p₁p₂, p₁p₂p₃, p₁p₂p₃ and, assuming that “30 square root...” means “30 times square root...”, these equate to 30(p₂/p₁)⁵, 30p₂/p₁, 30(p₃/p₁)², 30p₃/p₁ respectively. Remembering that we are dealing with prime numbers, there are no solutions! The number 30=2×3×5. Take p₁p₂p₃=30p₃/p₁ or p₁p₂=30p₂/p₁, for example: p₁²p₂=30, p₁²=30, but 30 has no prime numbers squared as a factor and it is not the square of a prime number.
Even if the ratio were reversed (smaller number as a fraction of the larger) the problem is essentially the same.
If, now assuming that “30 square root...” should have been “30. Square root...”, the product of the prime factors = 30, then p₁p₂p₃=2×3×5 and p₁=2, p₂=3 and p₃=5 so N=p₁p₂p₃⁵=18750 or p₁⁵p₂p₃=480, p₁p₂²p₃³=2250 or 360. The smallest of these is 360 and the largest 18750, so the ratio of smallest to largest is 12:625 and the square root is 2√3:25. But if we take the square root of 2250/360 we get √25/4=5/2 or ratio 2:5 for smallest:largest; or 18750/480=625/16 giving us smallest:largest=4/25.