Problem

Source: USA TST 2011 P6

Tags: algebra, polynomial, number theory, relatively prime, number theory unsolved



A polynomial $P(x)$ is called nice if $P(0) = 1$ and the nonzero coefficients of $P(x)$ alternate between $1$ and $-1$ when written in order. Suppose that $P(x)$ is nice, and let $m$ and $n$ be two relatively prime positive integers. Show that \[Q(x) = P(x^n) \cdot \frac{(x^{mn} - 1)(x-1)}{(x^m-1)(x^n-1)}\] is nice as well.