4. In the geometric sequence $\left\{a_{n}\right\}$, if $a_{1}=1, a_{3}=3$, then $\left(\sum_{k=0}^{10} \mathrm{C}_{10}^{k} a_{k+1}\right)\left[\sum_{k=0}^{10}(-1)^{k} \mathrm{C}_{10}^{k} a_{k+1}\right]=$ $\qquad$
4. 1024 .

From the problem, we know that the common ratio of the sequence $\left\{a_{n}\right\}$ is $q= \pm \sqrt{3}$. Using the binomial theorem, we get
$$
\begin{array}{l}
\left(\sum_{k=0}^{10} \mathrm{C}_{10}^{k} a_{k+1}\right)\left[\sum_{k=0}^{10}(-1)^{k} \mathrm{C}_{10}^{k} a_{k+1}\right] \\
=\left(\sum_{k=0}^{10} \mathrm{C}_{10}^{k} a_{1} q^{k}\right)\left[\sum_{k=0}^{10} \mathrm{C}_{10}^{k} a_{1}(-q)^{k}\right] \\
=a_{1}^{2}(1+q)^{10}(1-q)^{10}=\left(1-q^{2}\right)^{10} \\
=(-2)^{10}=1024 .
\end{array}
$$