[Math] Smallest number with a given number of factors

divisibilityfactoringnumber theory

From my rather rudimentary explorations of this fascinating problem, I believe it to be a layered and rewarding subject for investigation.

My question, essentially, is: How do you find the smallest number with a given number of factors? Indeed, as quickly becomes apparent, a distinction is called for between exactly a given number of factors and at least a given number of factors; as such, approaches considering both will be appreciated.

It's a fairly standard result in number theory that the number of distinct factors (including $1$ and itself) of some number $N$, where
$$
N = p_1^{a}\cdot\ p_2^{b}\cdot\ p_3^{c} \cdots
$$
($p_1$, $p_2$, $p_3\ldots$ being distinct primes) is
$$
(a+1)(b+1)(c+1)\cdots
$$

Thus, stated mathematically, the question appears to resolve into finding, or rather, finding a method of finding, this:
$$
\min\{N = 2^{a}\cdot\ 3^{b}\cdot\ 5^{c} \cdots \space| \space (a+1)(b+1)(c+1)\cdots = n \}
$$
or, as the case may be, this:
$$
\min\{N = 2^{a}\cdot\ 3^{b}\cdot\ 5^{c} \cdots \space| \space (a+1)(b+1)(c+1)\cdots \geq n \}
$$
($n$ being the given number of factors).

My crude, trial-and-error approach so far has been factorising $n$ into $n = n_1\cdot n_2\cdot n_3\cdots \space$ and then assigning $a = n_1 – 1,\space b = n_2 – 1,\space c = n_3 – 1,\space \ldots \space$ to get $N$, my only defence being that I tried to factorise sensibly and perceive some sort of pattern or rule at play. I have been unable to obtain anything beyond some common-sense tricks and techniques, though some of them seemed tantalisingly concrete.

I think it's a beautiful problem, and I'm looking for a way of solving it using a clever, universal algorithm. I'd greatly appreciate a comprehensive solution.

Best Answer

For the at least case, you should check out OEIS sequence A002182 which lists the numbers which set records for number of factors. Many references are given. For exactly equal, see A005179 which has the smallest number with a given number of divisors.

Related Question