Determine the maximum number of inflection points on $y=(1+x^{u_1})(1+x^{u_2})\dots(1+x^{u_n})$ where $u_i$ are chosen among the positive integers (not necessarily distinct).
Through experimentation, it seems that the maximum is five, for example $y=(1+x)(1+x^3)(1+x^4)(1+x^6)(1+x^7)$. (Here is the expansion.) Its graph is shown in red, with $y''$ in green.
Another example is $y=(1+x)(1+x^3)(1+x^4)(1+x^{13})$, provided by @Srini in the comments.
For a general function $y=(1+x^{u_1})(1+x^{u_2})\dots(1+x^{u_n})$, I can set $y''$ equal to $0$, but I do not know how to maximize the number of roots.
Not sure if this helps, but if we change all the plus signs to minus signs, i.e. $y=(1-x^{u_1})(1-x^{u_2})\dots(1-x^{u_n})$, it seems that the maximum number of inflection points is six, for example $y=(1-x)(1-x^3)(1-x^4)(1-x^6)(1-x^7)(1-x^8)(1-x^9)$. EDIT: This is not true; for example, $(1-x)(1-x^3)(1-x^4)(1-x^9)(1-x^{11})(1-x^{20})(1-x^{28})$ has eight inflection points (example provided by @Srini in chat).
Possibly related: this and this.
Context
I thought of this question when I noticed that $y=\prod\limits_{k=1}^\infty(1+x^k)$ seems to have exactly two inflection points, which I found peculiar.