TITLE: If $n$ is a product of primes, what is the number of divisors?
QUESTION [5 upvotes]: Let $n=p_1p_2...p_k$ Then the number of divisors is what?
I assumed it was $1+ \binom k1+ \binom k2 + \binom k3 + ... + \binom kk=2^k$
Is this correct?
Prove that the number of divisors is odd $\iff$ n is a perfect square

REPLY [6 votes]: It depends. Your answer 
$$ \sum_{m = 0}^k \binom km = 2^k $$ 
is correct, if all $p_i$ are distinct. Note that this makes a difference, $n = 2 \cdot 2$ has $(1,2,4)$ as divisors (namely 3), where $6 = 2 \cdot 3$ has $(1,2,3,6)$, so $4 = 2^2$. 
In general, if we have 
$$ n = \prod_i p_i^{\alpha_i} $$
with distinct primes $p_i$, for each $i$, we can choose $0, \ldots, \alpha_i$ factors $p_i$ in a divisor of $n$, so alltogether we have 
$$ \prod_i (\alpha_i + 1) $$
divisors. Note that is number is odd iff all $\alpha_i$ are even. But then 
$$ n = \prod_i p_i^{\alpha_i} = \prod_i p_i^{2\beta_i} = \left(\prod_i p_i^{\beta_i}\right)^2. $$