Suppose $n=p_1^{e_1}\,p_2^{e_2}\, \cdots \, p_t^{e_t}$ where $p_i$,$1\leq i \leq t$, are prime numbers and $P(X) \in \mathbb Z_d[X]$. Now, my question it is, If $X^{q_i} - 1$, is divisible by $P(X)$ mod $p_i^{e_i}$,$1\leq i \leq t$,where $q_i$ are positive integer numbers, and $Lcm(q_1\,q_2\, \cdots, \, q_t)$ be a number like $m$ where $Lcm$ is the Least common multiple, then can we conclude that $X^{m}-1$ is divisible by $P(X)$ mod $n$?
Thanks for any suggestion.