I recently studied that:
$$\tau \ (n) = (k_1+1)(k_2+1) \cdots (k_{r}+1)$$ $$\sigma\ (n) = \frac{p_{1}^{k_1 + 1} -1}{p_1 - 1}{\frac{p_{2}^{k_2 + 1} -1}{p_2 - 1}} \cdots {\frac{p_{r}^{k_r + 1} -1}{p_r - 1}}$$ and proof of this goes something like:
Theorem 6-1 states that : If $n = p_{1}^{k_{1}}{p_{2}^{k_{2}}} \cdots {p_{r}^{k_{r}}}$ is the prime factorization of $n > 1$, then the positive divisors of $n$ are precisely those integers d of the form $$d = p_{1}^{a_{1}}{p_{2}^{a_{2}}} \cdots {p_{r}^{a_{r}}}$$ where $0 \leq\ a_i\leq\ k_i\ (i = 1,\ 2 \cdots,\ r)$
And finally I want to know how there can be $k+1$ choices for $a_1$ and why $(k_1+1)(k_2+1) \cdots (k_r + 1)$ produces possible divisors of $n$.
And in similar fashion why and how $(1 + p_1 + p_1^2 + \cdots + p_1^{k_1})(1 + p_2 + p_2^2 + \cdots + p_{2}^{k_2}) \cdots (1 + p_r + p_r^2 +\cdots + p_r^{k_r})$ give sum of divisors.
Please write in elementary way.