Find compact formula for $B(x)$ such that $ A(x) = P(x) \cdot B(x) $ – generating functions

Let A(x) be generating function of number divides such that contains exactly one (but it can be multi taken) fraction $ 2$ , $ 3$ , $ 5$ .

Let P(x) be generating function of all possible number divides.

Find compact formula for $ B(x)$ such that

$ $ A(x) = P(x) \cdot B(x) $ $

My try

$ $ A(x) = (1+x^2+x^4+…) + (1+x^3+x^6 + … ) + (1+x^5+x^{10}+…) = \\sum_{k} ([k\mod 2 = 0] + [k\mod 3 = 0] + [k\mod 5 = 0])x^k $ $

Now $ P(x)$

$ $ P(x) = \frac{1}{(1-x)(1-x^2)(1-x^3)\cdot…} $ $

But how can I get a compact formula from these calculations? $ $ \text{factor }([k \mod 2 = 0] + [k \mod 3 = 0] + [k \mod 5 = 0]) \text{ makes a problem there}$ $