Which three-digit number has the greatest number of different factors?
This question comes from an Olympiad, where four marks were given for the solution to this problem. The textbook lists an accepted answer as:
Let $N$ be the three-digit number which has the greatest number of different factors. Since $2\times3\times5\times7\times11>1000$, $N$ at most has four different prime factors.
If $N$ only has one prime factor, then $N=2^9$, and so $N$ has 10 different factors.
If $N$ has exactly two prime factors, then $N=2^5\times3^3$, and so $N$ has 24 different factors.
If $N$ has exactly three prime factors, then $N=2^4\times3^2\times5$, and so $N$ has 30 different factors.
If $N$ has exactly four prime factors, then $N=2^3\times3\times5\times7$, and so $N$ has 32 different factors.
What I don't understand is why $N=2^5\times 3^3$ when $N$ has two prime factors, and similarly why $N=2^3\times3\times5\times7$ when N has three factors. I think it has to do with the maximum 'arrangement' of factors such that $N$ has the most factors possible, but I don't understand how we can calculate that. Furthermore, could we solve a similar problem involving a four-digit number instead using the above method?
Thanks for any help you're able to provide. -Jazza