<s>[INST] Find a close formula using generating functions I want to find the sum:
$$\sum \limits_{k=0}^n {n\choose k}2^{k-n}$$
I did it by using the binomial theorem and I got 
$$\sum \limits_{k=0}^n {n\choose k}2^{k-n}
= 2^{-n} \sum \limits_{k=0}^n {n \choose k}2^k
= \left(\frac{1}{2}\right)^n3^n$$
I would like to know how to do it using generating functions. I have tried some calculations but I am stuck. This is what I have so far.
$$\sum \limits_{k=0}^n {n\choose k}2^{k-n}
=\sum \limits_{n\ge0} \sum \limits_{k\ge0} {n \choose k} 2^{k-n} x^n
=\sum \limits_{k\ge0} 2^k \sum \limits_{n\ge0} {n \choose k}\left(\frac{x}{2}\right)^n$$
 [/INST] Another look at the problem, using the fact that
$${\displaystyle {\binom {n}{k}}={\binom {n-1}{k-1}}+{\binom {n-1}{k}}}$$
we can construct the recurrence relation for the sequence:
$$a_n=\sum \limits_{k=0}^n {n\choose k}2^{k-n}=
{n\choose 0}2^{-n}+\sum \limits_{k=1}^{n-1} {n\choose k}2^{k-n}+{n\choose n}2^{0}=\\
{n\choose 0}2^{-n}+\sum \limits_{k=1}^{n-1} \left({n-1\choose k-1}+{n-1\choose k}\right)2^{k-n}+{n\choose n}2^{0}=\\
{n\choose 0}2^{-n}+\sum \limits_{k=1}^{n-1} {n-1\choose k-1}2^{(k-1)-(n-1)}+\sum \limits_{k=1}^{n-1}{n-1\choose k}2^{k-n}+\color{red}{{n\choose n}2^{0}}=\\
\color{blue}{{n\choose 0}2^{-n}}+\sum \limits_{k=0}^{n-2} {n-1\choose k}2^{k-(n-1)}+\color{red}{{n-1\choose n-1}2^{0}}+\sum \limits_{k=1}^{n-1}{n-1\choose k}2^{k-n}=\\
a_{n-1}+\color{blue}{\frac{1}{2}{n-1\choose 0}2^{-(n-1)}}+\frac{1}{2}\sum \limits_{k=1}^{n-1}{n-1\choose k}2^{k-(n-1)}=\\
a_{n-1}+\frac{1}{2}a_{n-1}=\frac{3}{2}a_{n-1}$$
This recurrence can be solved by induction, using generating functions or characteristic polynomials.
With generating functions, given $a_0=1$
$$f(x)=a_0+\sum\limits_{n=1}a_nx^n=1+\frac{3}{2}x\sum\limits_{n=1}a_{n-1}x^{n-1}=\\
1+\frac{3}{2}x\sum\limits_{n=0}a_{n}x^{n}=
1+\frac{3}{2}xf(x)$$
leading to
$$f(x)=\frac{1}{1-\frac{3}{2}x}=\sum\limits_{n=0}\color{red}{\left(\frac{3}{2}\right)^n}x^n$$
</s>