Fastest way to perform this multiplication expansion? Consider a product chain:
$$(a_1 + x)(a_2 + x)(a_3 + x)\cdots(a_n + x)$$
Where $x$ is an unknown variable and all $a_i$ terms are known positive integers.
Is there an efficient way to expand this?

The constant term is easy to compute, it's just the product of the $a_i$. The coefficient of $x^{n-1}$ is $\sum_i a_i$, so that is also easy. 
Assume for a moment that $n = 2k$ is even, then the coefficient of $x^k$ is the sum of all possible products consisting of $k$ different $a_i$. There are $\binom{n}{k} \approx 2^n/\sqrt{n} $ such products and there is no obvious way to simplify their sum in the general case.
So I suspect that in the general case of large $n$ there is no efficient way to obtain the expansion.
