On the partitions of a number

43 Views Asked by At

I need to find the generating function for number of partitions of $n$ into parts that are divisible by $2$ and every one of them appears at most twice. I think that solution is $f(x)=(1+x+x^2)(1+x^2+x^4)(1+x^4+x^8)\cdots$ Is this correct?

1

There are 1 best solutions below

2
On

That is the right idea, but your first factor corresponds to part size $1$, which is not divisible by $2$ and hence should appear. The correct generating function is $$\prod_{k \ge 1} (1+x^{2k}+x^{4k})$$