Number of Divisors Formula

Prove that
\[
\#\operatorname{div}(n)
=(a_1+1)(a_2+1)\cdots(a_r+1).
\]

given the prime factorization
\[
n=p_1^{a_1}p_2^{a_2}\cdots p_r^{a_r},
\]
by the fundamental theorem of arithmetic.

Solutions