Find a value of $n$ that has exactly 32 divisors I know that I could simply multiply the first $32$ primes together but is there some other way to ascertain the answer to this number theory problem?
 A: In general a number with prime factorization $p_1^{a_1}p_2^{a_2}\cdots p_{k}^{a_k}$ has $\prod_{i=1}^{k}(a_i+1)$ divisors: the prime $p_i$ can occur from $0$ to $a_i$ times in each divisor.  So to find all numbers with exactly $32$ divisors, first find all factorizations of $32$.  There are a number of these; each one corresponds to a family of numbers with exactly $32$ divisors:
$$
32=2\cdot 2\cdot 2\cdot 2\cdot 2 \implies p_1p_2p_3p_4p_5
$$
$$
32=4\cdot8\implies p_1^3p_2^7
$$
$$
32=32\implies p_1^{31}
$$
etc.
A: Multiplying the first $32$ primes together would not work. Even multiplying the first three primes together gives you a number: $30$, with $8$ divisors: $\{1, 2, 3, 5, 6, 10, 15, 30\}$.
The number of divisors of a number is a multiplicative function, and since each prime has $2$ divisors, the product of $n$ distinct primes has $2^n$ divisors. That fact points to an answer to your original question.
A: Since $p_1^{a_1}\cdot p_2^{a_2}\dots p_r^{a_r}$ has $(a_1+1)(a_2+1)\dots(a_r+1)$ factors and $2^5=32$ there can't be more than five prime factors.
With five you have $a_1=a_2=a_3=a_4=a_5=1$ and in fact any partition of $5$ will give a solution.
A: Well, the smallest number with 32 divisors is $840,$ see https://oeis.org/A005179/b005179.txt  and  https://oeis.org/A005179 
$$ 2^3 \cdot  3 \cdot 5 \cdot 7, $$
divisors 
$$ 4 \cdot 2 \cdot 2 \cdot 2 = 32. $$
NOTE: $840$ is highly composite, so any smaller number has $31$ divisors or fewer. This problem will not generally give highly composite answers, it is just luck that $32$ works.
