8. Find all integer-coefficient polynomials $P(x)$ of odd degree $d$ that satisfy the following property: for each positive integer $n$, there exist $n$ distinct positive integers $x_{1}, x_{2}, \cdots, x_{n}$, such that for every pair of indices $i, j (1 \leqslant i, j \leqslant n)$, we have $\frac{1}{2}<\frac{P\left(x_{i}\right)}{P\left(x_{j}\right)}<2$, and $\frac{P\left(x_{i}\right)}{P\left(x_{j}\right)}$ is a rational number raised to the power of $d$.
```
8. $P(x)=a(r x+s)^{d}$, where $a, r, s$ are integers, and $a \neq 0, r \geqslant 1, (r, s)=1$.
    Let $P(x)=\sum_{i=0}^{d} a_{i} x^{i}, y=d a_{d} x+a_{d-1}$.
    Define $Q(y)=P(x)$, then $Q$ is a polynomial with rational coefficients, and it does not contain the term $y^{d-1}$.
    Let $Q(y)=b_{d} y^{d}+\sum_{i=0}^{d-2} b_{i} y^{i}$,
    $B=\max _{0 \leq i \leq d}\left\{\left|b_{i}\right|\right\}\left(b_{d-1}=0\right)$.
    Then the condition is that for each positive integer $n$, there exist $n$ positive integers $y_{1}, y_{2}, \cdots, y_{n}$, such that for each pair of indices $i, j$
    $(1 \leqslant i, j \leqslant n)$, we have $\frac{1}{2}<\frac{Q\left(y_{i}\right)}{Q\left(y_{j}\right)}<2$, and $\frac{Q\left(y_{i}\right)}{Q\left(y_{j}\right)}$
    is a rational number to the power of $d$.
        Since $n$ can be arbitrarily large, we can assume that all
        $x_{i}$, and hence all $y_{i}$, are integers larger in absolute value than some constant.
            Since $d$ is odd, by Dirichlet's theorem,
            there exists a sufficiently large prime $p$ such that
                $p \equiv 2(\bmod d)$
                In particular, $(p-1, d)=1$.
                For this fixed $p$, choose $n$ to be sufficiently large.
                By the pigeonhole principle, among $y_{1}, y_{2}, \cdots, y_{n}$, there must be
                $d+1$ numbers that are congruent modulo $p$. Without loss of generality, assume that for
                $1 \leqslant i, j \leqslant d+1$, we have $y_{i} \equiv y_{j}(\bmod p)$.
                First, we prove a lemma.
                    Lemma For all $i(2 \leqslant i \leqslant d+1)$, we have
                    $\frac{Q\left(y_{i}\right)}{Q\left(y_{1}\right)}=\frac{y_{i}^{d}}{y_{1}^{d}}$.
                    Proof Let $\frac{Q\left(y_{i}\right)}{Q\left(y_{1}\right)}=\frac{l^{d}}{m^{d}}$, where $l, m$ are positive integers,
                and $(l, m)=1$.
                    Then we can rewrite it as
                    $b_{d}\left(m^{d} y_{i}^{d}-l^{d} y_{1}^{d}\right)$
                    $=-\sum_{j=0}^{d-2} b_{j}\left(m^{d} y_{i}^{j}-l^{d} y_{1}^{j}\right)$.
                    Let $c$ be the least common multiple of the denominators of all coefficients of the polynomial $Q$. Then for all integers $k, c Q(k)$ is
                    an integer.
                    Since $c$ depends only on the polynomial $P$, we can assume
                    $(p, c)=1$.
                    By $y_{1} \equiv y_{i}(\bmod p)$, we have
                    $c Q\left(y_{1}\right) \equiv c Q\left(y_{i}\right)(\bmod p)$.
                    We consider two cases.
                    (1) $p \mid c Q\left(y_{1}\right)$.
                    In this case, the numerator and denominator of $\frac{c Q\left(y_{i}\right)}{c Q\left(y_{1}\right)}$ have a common factor $p$, so
                    $m^{d} \leqslant p^{-1}\left|c Q\left(y_{1}\right)\right|$.
                    Since $y_{1}$ is large, there exists a positive constant $B$ such that
                    $\left|Q\left(y_{1}\right)\right|<2 B y_{1}^{d}$.
                    Therefore, $m \leqslant p^{-\frac{1}{d}}(2 c B)^{\frac{1}{d}} y_{1}$.
                    Since $y_{1}, y_{i}$ are large, we have
                    $\frac{1}{2}<\frac{Q\left(y_{i}\right)}{Q\left(y_{1}\right)}<2 \Rightarrow \frac{1}{3}<\frac{y_{i}^{d}}{y_{1}^{d}}<3$,
                    and $\frac{1}{2}<\frac{l^{d}}{m^{d}}<2$.
                    The left-hand side of equation (1) is
                    $b_{d}\left(m y_{i}-l y_{1}\right) \sum_{j=0}^{d-1} m^{j} y_{i}^{j}\left(l y_{1}\right)^{d-1-j}$.
                    If $m y_{i}-l y_{1} \neq 0$, then the absolute value of the above expression is at least
                $\left|b_{d}\right| m^{d-1} y_{i}^{d-1}$
                    But by equations (3), (4), (2), and again by equation (3), the absolute value of the right-hand side of equation (1) is at most
                    $\sum_{j=0}^{d-2} B\left(m^{d} y_{i}^{j}+l^{d} y_{1}^{j}\right)$
                    $\leqslant(d-1) B\left(m^{d} y_{i}^{d-2}+l^{d} y_{1}^{d-2}\right)$
                    $\leqslant(d-1) B 7 m^{d} y_{i}^{d-2}$
                    $\leqslant 7(d-1) B p^{-\frac{1}{d}}(2 c B)^{\frac{1}{d}} y_{1} m^{d-1} y_{i}^{d-2}$
                    $\leqslant 21(d-1) B p^{-\frac{1}{d}}(2 c B)^{\frac{1}{d}} m^{d-1} y_{i}^{d-1}$.
                    Therefore, $\left|b_{d}\right| m^{d-1} y_{i}^{d-1}$
                    $\leqslant 21(d-1) B p^{-\frac{1}{d}}(2 c B)^{\frac{1}{d}} m^{d-1} y_{i}^{d-1}$.
                    Since $p$ is sufficiently large, and $b_{d}, B, c, d$ depend only on the polynomial
                    $P$, this is a contradiction.
                    Therefore, $m y_{i}-l y_{1}=0$.
                    (2) $\left(p, c Q\left(y_{1}\right)\right)=1$.
                    By $c Q\left(y_{1}\right) \equiv c Q\left(y_{i}\right)(\bmod p)$
                    $\Rightarrow l^{d} \equiv m^{d}(\bmod p)$.
                    Note that $(p-1, d)=1$.
                    By Fermat's little theorem, $l \equiv m(\bmod p)$.
                    Therefore, $p \mid\left(m y_{i}-l y_{1}\right)$.
                    If $m y_{i}-l y_{1} \neq 0$, then the absolute value of the left-hand side of equation (1) is at least $\left|b_{d}\right| p m^{d-1} y_{i}^{d-1}$
                    Similarly to (1), the absolute value of the right-hand side of equation (1) is at most
                    $21(d-1) B(2 c B)^{\frac{1}{d}} m^{d-1} y_{i}^{d-1}$.
            Since $p$ is sufficiently large, equation (1) cannot hold.
            Therefore, $m y_{i}-l y_{1}=0$.
                In both cases, we have $\frac{Q\left(y_{i}\right)}{Q\left(y_{1}\right)}=\frac{l^{d}}{m^{d}}=\frac{y_{i}^{d}}{y_{1}^{d}}$.
                The lemma is proved.
                By the lemma, the polynomial $Q\left(y_{1}\right) y^{d}-y_{1}^{d} Q(y)$ has
            $d+1$ distinct roots $y=y_{1}, y_{2}, \cdots, y_{d+1}$. Since the
            degree of this polynomial is at most $d$, it must be the zero
            polynomial.
                Therefore, $Q(y)=b_{d} y^{d}$.
                This implies that $P(x)=a_{d}\left(x+\frac{a_{d-1}}{d a_{d}}\right)^{d}$.
                Let $\frac{a_{d-1}}{d a_{d}}=\frac{s}{r}(r, s$ are integers, and $r \geqslant 1, (r, s)=1)$.
                Since $P$ is a polynomial with integer coefficients, we have $r^{d} \mid a_{d}$.
                Let $a_{d}=r^{d} a$.
                    Then $P(x)=a(r x+s)^{d}$, and it satisfies the conditions.
```