I want to find the coefficients of the $n$-th degree polynomial obtained from the expansion of the binomial product:
$$\prod_{i=1}^n{(x-a_i)}$$
where $x$ and $a_i$ are real numbers. Is there any efficient formula or recursive algorithm to calculate such coefficients? I found in wikipedia the formula for the more general case of the multi-binomial product but it does not seem very efficient.