[Math] General Formula for Number of Terms in an Expansion

binomial theorembinomial-coefficientscombinatoricspolynomials

Suppose one is looking at the general expansion of
$$
(a_1 + a_2 + a_3\,\, +\,\, …\,\, +\,\, a_k)^n
$$
where $a_k > 0 \,\,\,\,\forall k \in \mathbb{Z}$

Is there a formula that will yield the amount of terms that the resulting expansion will contain?

For example, the binomial expansion $(a+b)^n$ always has $(n+1)$ terms. Is there a way to generalize this?

Best Answer

Hint: Each term in the expansion is of form $\prod a_i^{x_i}$ with $x_i \ge 0$ and $\sum x_i=n$. So the question is in how many ways can we find such $x_i$. This is solved easily by Stars and Bars, to get $\binom{n+k-1}{k-1}$ ways.

Related Question