Generating Functions and Integer Partitions

A.Let A(n) be the number of partitions n in which no part occurs more than twice. Find the generating function.

My Answer:

$\displaystyle (1 +x)(x+x^{2})(x^{2}+x^{3})...........(x^{i}+x^{i+1} )$

$\displaystyle \prod_{i=0}^{\infty}$$\displaystyle (x^{i}+x^{1+i})$

B. let B(n) be the number of partitions of n in which no part is a multiple of 3. Find the Generating function.

$\displaystyle \dfrac{1}{1-x}$-$\displaystyle \dfrac{1}{1-x^{3}}$

I'm still new with these, I'm sure I messed up, can anyone help me out?