Given
$$G(q)=\cfrac{1}{1-q+\cfrac{q(1-q)^2}{1-q^3+\cfrac{q(1-q^2)^2}{1-q^5+\cfrac{q(1-q^3)^2}{1-q^7+\cfrac{q(1-q^4)^2}{1-q^9}}}}}=\exp(\sum_{n=2}^{\infty} (-1)^n\phi(n)\,q^n)$$
where $|q|\lt1$,and $\phi(n)$ represents the nth coefficients of the series.
Why is $\phi(n)$ integer only when $n$ is prime and non-integer when it is composite?
I made this simple observation using mathematica,a disproof (by providing a counterexample) is very much welcome.
It is a really interesting observation. But sadly I found a counter-example.
As you may know, we can put the following code into Mathematica for the series generation.
where n is the order of the series.
I notice that when $n=143$, $\phi(n)=66650203204753876953026636747858671380118102453197443680828893588$, which is an integer. However, $143=11 \cdot 13$ and thus $143$ is not a prime number.
Therefore, the proposition has been disproved.
I am not able to explain this phenomenon completely, but Ramanujan tau function may help. It is defined by the following identity:
$$\sum_{n\ge1}\tau(n)q^n=q\prod_{n\ge1}(1-q^n)^{24}=\eta(z)^{24}=\Delta(z)$$