Is there an easier way to extract coefficients from the product of two generating functions?
In Levin's book, the only way mentioned was $${a_0}{b_0} + ({a_0}{b_1}+{a_1}{b_0})x + (a_0b_2+a_1b_1+a_2b_1)x^2...$$ and so on.
It's hard when the sequence does not have a definite pattern. Is there any easier way to do this?
This is known as the "cauchy product", and as far as I know it is the only way to do it. However, it's not as complicated as it looks.
The $n$th coefficient of $x^n$ in $AB$ is $\displaystyle \sum_{i+j=n} a_i b_j$. That is
$$a_0b_n + a_1b_{n-1} + \ldots + a_{n-1}b_1 + a_nb_0$$
Notice each product sums to $n$:
In this way, knowing the first $n$ coefficients of $A$ and the first $n$ coefficients of $B$ is enough to know the first $n$ coefficients of $AB$.
I hope this helps ^_^