Expansion coefficients Suppose that we are given the function $f(x)$ in the following product form: 
$$f(x) = \prod_{k = -K}^K (1-a^k x)\,,$$
Where $a$ is some real number. 
I would like to find the expansion coefficients $c_n$, such that:
$$f(x) = \sum_{n = 0}^{2K+1} c_n x^n\,.$$
A closed form solution for $c_n$, or at least a relation between the coefficients $c_n$ (e.g. between $c_n$ and $c_{n+1}$) would be great! 

Let the function $f_n(x)$ be given by
$$
f_n(x) = \prod_{k=-n}^{n} \left( 1 - a^k x \right)
$$
Since it is clear that it is a polynomial of degree $2 n +1$, it can be expressed as:
$$
f_n(x) = \sum_{k=0}^{2n+1} c_{n,k} x^k
$$
in some yet unknown coefficients $c_{n,k}$. For these coefficients it is easy to see that $c_{n,0}=1$ and $c_{n,2n+1}=-1$. More generally one could show that $c_{n,k} = -c_{n,2n+1-k}$.
The functions for different values of $n$ are related by:
$$
f_n(x) = f_{n-1}(x) * \left(1 - a^n x\right)\left(1-a^{-n}x\right) = 
f_{n-1} * \left[1 - \left(a^n + a^{-n}\right)x + x^2\right]
$$
If we now substitute the expansion in to this expression and group the terms with the same power of $x$ on both the left and right side we can find a recurrence relation between the coefficients $c_{n,k}$ of successive functions:
$$
c_{n,k} = c_{n-1,k} - \left(a^n + a^{-n}\right) c_{n-1,k-1} + c_{n-1,k-2}
$$
Together with the condition $c_{0,0} = 1$ and $c_{0,k}$ for $k \neq 0$ this completely specifies the coefficients and one could set up a program to evaluate them, because in general a simple and compact expression for  them might not exist.
In this particular case, however, there is such a "simple" expression:
$$
c_{n,k} =\frac{\prod_{i=0}^{k-1} \left(a^{2n+1} - a^i \right)}{a^{k n}\prod_{i=1}^{k} \left(1 - a^i \right)}
$$
with $0 \leq k \leq 2n+1$ and the product by definition is unity if no terms are present. By rearranging the limits of products a few other but equivalent expressions exist.
Deriving them is a lot of work so I simply presented them. The fact that they are correct however, is a lot easier to show. For this one first observes that $c_{0,0}=1$. From there we only need to show that the expression satisfies the recurrence relation shown above and the correctness follows from induction.
I leave that proof as an exercise, but give the following hint. In the recurrence relation there are three coefficients on the right hand side for the same value of $n$. If you compare the coefficients $c_{n-1,k}$, $c_{n-1,k-1}$, and $c_{n-1,k-2}$ there are quite a few factors from the numerator and denominator that they have in common and which also appear in $c_{n,k}$. The simplest way to see such a thing is to write the recurrence relation out for some chosen values for $n$ and $k$.
As another remark consider $c_{n,k}$ for $k>n$, then the number of factors in the numerator and denominator keep on growing which appear to lead to very long expressions. This is however not the case and can be seen as well if you write all the factors out for some particular values of $n$ and $k$.
