Generating function of $(n+1) 2^n a_n$ Given that $f(x)$ is the generating function of $a_n$ ($f(x)=\sum_{n=0}^{\infty}a_n x^n$), find the generating function of $(n+1) 2^n a_n$.
The generating function with $n\ge0$ is:
$$\sum_{n=0}^{\infty}(n+1) 2^n a_n x^n$$
But how to transform it into a function (instead of a series) depending on $f(x)$?
 A: Substituting $2x$ for $x$ will multiply each coefficient $a_n$ by $2^n$. Differentiating the function will create a factor $n$ from, $x^n$ but will at the same time drop the exponent by$~1$; this can be repaired by afterwards multiplying by$~x$. So the operation $\def\d{\mathrm d}x{*}\circ \frac\d{\d x}$ (which I have once seen written lightheartedly as $x\d/\d x$) multiplies each coefficient $a_n$ by$~n$. We actually want multiplication by$~n+1$, which can be obtained either by adding a copy of the original function, or by switching the order of operations by applying $\frac\d{\d x}\circ x{*}$: multiply by $x$ before differentiating (I guess one could obfuscate that to $\d/\d x\circ x$ if one wanted to).
Now this needs to be put together. Since multiplying by $2^n$ and by $n+1$ commute, the two operations ought to commute. They do, and here are the two ways to get the result (carefully writing functions fully as $f=(x\mapsto f(x))$; just writing $f(x)$ for $f$ would cause confusion):
$$
  \frac\d{\d x}\circ x{*}\, (x\mapsto f(2x))
 =\frac\d{\d x}(x\mapsto xf(2x))
 =x\mapsto f(2x)+2xf'(2x),
$$
and
$$
\begin{align}
  x\mapsto\left(\frac\d{\d x}(x\mapsto xf(x))\right)(2x)
 &=x\mapsto\left(x\mapsto f(x)+xf'(x)\right)(2x)
\\&=x\mapsto f(2x)+2xf'(2x).
\end{align}
$$
So the generating function is (what would normally be written as) $f(2x)+2xf'(2x)$.
