Artificial intelligent assistant

Find B(x) such that $A(x) = P(x) \cdot B(x) $ > A(x) is enumerator (generating function) of partitions of number such that contain exactly $1$ (but maybe multi times) of $2,3,5$. P(x) is enumerator of all partitions. Find compact pattern for $B(x)$ such that $$A(x) = P(x) \cdot B(x) $$ ## My try $$P(x) = (1+x+x^2+...)(1+x+x^2+...)...(1+x+x^2+...) = \left(\frac{1}{1-x}\right)^n $$ $$A(x) = \underbrace{1\cdot1\cdot (1+x+x^2+...)(1+x+x^2+...)...(1+x+x^2+...) = \left(\frac{1}{1-x}\right)^n \cdot 3}_{\mbox{each case when I haven't 2,3 or 1,3 or 1,2}} $$ So $$ B(x) = 3\cdot(1-x)^2$$ is that correct?

The enumerator of all partitions of number is $$ P(x)=\sum_n P_{n}x^{n} = (1+x+x^2+\ldots)(1+x^2+x^4+\ldots)(1+x^3+x^6+\ldots)\cdot\ldots\cdot(1+x^{k}+x^{2k}+\ldots)\cdot\ldots = \frac{1}{(1-x)(1-x^2)(1-x^3)\cdot\ldots\cdot(1-x^k)\cdot\ldots} $$ because when you pick up the $k$ number $i$ times to the partition of number then you take the $x^{ik}$ from the $k$-th bracket.

So in similar way we can create the second enumerator which has a form defined by the constraints given in your task $$ A(x)=\leftx^2(1+x^2+x^4+\ldots)+x^3(1+x^3+x^6+\ldots)+x^5(1+x^5+x^{10}+\ldots)\right(1+x^4+x^8+\ldots)(1+x^6+x^{12}+\ldots)(1+x^7+x^{14}+\ldots)(1+x^8+x^{16}+\ldots)\cdot\ldots = \left[\frac{x^2}{1-x^2}+\frac{x^3}{1-x^3}+\frac{x^5}{1-x^5}\right]\frac{1}{(1-x)(1-x^4)(1-x^6)\cdot\ldots\cdot(1-x^k)\cdot\ldots}=\frac{3x^{10}-2x^8-2x^7-x^5+x^3+x^2}{(1-x)(1-x^2)(1-x^3)\cdot\ldots\cdot(1-x^k)\cdot\ldots} $$ and now you can easily see that $$ B(x)=3x^{10}-2x^8-2x^7-x^5+x^3+x^2 $$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy b74b76154e6cb20c2974435a6f9132eb