4. In the expansion of $(x+\sqrt{x}+1)^{2 n+1}\left(n \in \mathbf{N}^{*}\right)$, the sum of the coefficients of the integer power terms of $x$ is $\qquad$
$$
\text { Let } t=\sqrt{x} \Rightarrow\left(t^{2}+t+1\right)^{2 n+1}=a_{0}+a_{1} t+a_{2} t^{2}+\cdots+a_{4 n+2} t^{4 n+2} \text {, }
$$

Obviously, what we need to find is $a_{0}+a_{2}+\cdots+a_{4 n+2}$. Taking $t=1,-1$ gives $a_{0}+a_{2}+\cdots+a_{4 n+2}=\frac{3^{2 n+1}+1}{2}$.