Finding generating function for a given sequence The task is to find the generating function for the sequence $$d_n = (\sum_{k=0}^n \binom{n}{k})*(\sum_{k=0}^n \frac{(k-1)^2}{2^k})$$
let's call this function $D(x)$.
I marked $a_n = \frac{1}{2^n}$; $b_n = \frac{-2n}{2^n}$; $c_n = \frac{n^2}{2^n}$ with respective generating functions $A(x)$, $B(x)$, $C(x)$.
So I found $$A(x) = \frac{1}{1-\frac{x}{2}}$$ and
$$B(x) = \frac{-x}{(1-\frac{x}{2})^2}$$
$$C(x) = \frac{2x+3x^2}{4(1-\frac{x}{2})^3}$$
using derivatives.
now the generating function for $a_n + b_n +c_n$ should be $A(x)+B(x)+C(x)$ and it's $$\frac{x^2}{(1-\frac{x}{2})^3}$$.
Next by using convolution (with let's say $f_n = 1$) we'll get that the function for the series $$u_n = \sum_{k=0}^n \frac{(k-1)^2}{2^k})$$ is $$\frac{x^2}{(1-\frac{x}{2})^3(1-x)}$$
Now since $h_n = \sum_{k=0}^n \binom{n}{k} = 2^n$ the appropriate function is $$H(x) = \frac{1}{1-2x}$$.
Again with using convolution with $h_n$ and $u_n$ we'll get that $$D(x) = H(x)U(x) = \frac{x^2}{(1-\frac{x}{2})^3(1-x)(1-2x)}$$
Is my answer good? or shall i keep expanding it to partial fractions.

I think you had to compute the sums first and then multiply. I mean, the sequence is:
$$d_n = \left(\sum_{k=0}^n \binom{n}{k}\right)\cdot\left(\sum_{k=0}^n \frac{(k-1)^2}{2^k}\right)$$
Which means
$$d_n=2^n\cdot\left(\sum _{k=0}^n \frac{k^2}{2^k}-2\sum _{k=0}^n \frac{k}{2^k}+\sum _{k=0}^n \frac{1}{2^k}\right)=\\=2^n\cdot\left[(6-2^{-n} n^2-2^{2-n} n-3\cdot 2^{1-n})-2(-2^{-n} n-2^{1-n}+2)+(2-2^{-n})\right]=\\=2^n\cdot\left[2^{-n} \left(2^{n+2}-n^2-2 n-3\right)\right]=2^{n+2}-n^2-2n-3$$
$d_n=2^{n+2}-n^2-2n-3$
And its generating function is 
$$F(x)=\frac{4}{1-2 x}-\frac{-x^2-x}{(x-1)^3}-\frac{2 x}{(x-1)^2}-\frac{3}{1-x}=\\=\frac{4 x^2-3 x+1}{(x-1)^3 (2 x-1)}$$
Hope this answers to your question
