4. Find all polynomials with real coefficients such that for every real number $x$ the following holds

$$
(1+2 x) P(2 x)=\left(1+2^{1000} x\right) P(x)
$$
Solution. Let $P(x)=a_{0} x^{n}+a_{1} x^{n-1}+\ldots+a_{n-1} x+a_{n}$. From the condition of the problem, for the leading coefficient we have

$$
2 \cdot 2^{n} a_{0}=2^{1000} a_{0}
$$

Thus, the degree of the polynomial is $n=999$. It is clear that $x=-\frac{1}{2}$ is a root of the polynomial. Then, for $x=-\frac{1}{2^{2}}$ we have

$$
\left(1-2 \frac{1}{2^{2}}\right) P\left(-\frac{1}{2}\right)=\left(1+2^{1000}\left(-\frac{1}{2^{2}}\right)\right) P\left(-\frac{1}{2^{2}}\right)
$$

which simplifies to

$$
\left(1-2^{998}\right) P\left(-\frac{1}{2^{2}}\right)=0
$$

from which it follows that $x=-\frac{1}{2^{2}}$ is a root of the polynomial $P(x)$. Continuing in this manner, we find that $x=-\frac{1}{2^{k}}, 1 \leq k \leq 999$ are the roots of the polynomial $P(x)$. Therefore, the desired polynomial is

$$
P(x)=a_{0}\left(x+\frac{1}{2}\right)\left(x+\frac{1}{2^{2}}\right) \cdot \ldots \cdot\left(x+\frac{1}{2^{999}}\right)
$$

where $a_{0} \in \mathbb{R}$ is the desired polynomial.