# Finding the generating funcrtion associated with a sequence

I'm having a little trouble understanding this type of question:

Find the generating function for this sequence.

$$0,0,1,0,16,32,64,128,256,512...$$

I'm pretty new to this concept of generating functions and I don't completely understand how to solve these types of questions. Could someone point me in the right direction? Thanks.

The generating function is $$0\cdot x^0+0\cdot x^1+1\cdot x^2+0\cdot x^3+16\cdot x^4+32\cdot x^5+64\cdot x^6+\cdots.$$

The part from $16\cdot x^4$ on is $$16x^4(1+2x+4x^2+8x^3+\cdots).$$ We recognize the infinite sum as a geometric series with first term $1$ and common ratio $2x$, so sum $\frac{1}{1-2x}$ if $|x|\lt 1/2$.

Now you have all the information needed to write down a closed form for the generating function.

• so, for the $x^4$ part i've gotten $\frac{16x^4}{1-2x}$ what about from $x^0$to$x^3?$ It should be done the same way, but I think I've confused myself – Daniel Munoz Jun 4 '15 at 5:12
• That part is just $x^2$, so the final answer is $x^2+\frac{16x^4}{1-2x}$. – André Nicolas Jun 4 '15 at 5:18
• Hate to be a pain.. But why is it just $x^2$? – Daniel Munoz Jun 4 '15 at 5:19
• $0\cdot x^0+0\cdot x^1+1\cdot x^2+0\cdot x^3=x^2$. Of course you could keep all the $0$ terms and be correct, but it would look kind of strange. – André Nicolas Jun 4 '15 at 5:22
• I was using $\cdot$ for product. – André Nicolas Jun 4 '15 at 5:23