4. Given the sequences $\left\{a_{n}\right\}$ and $\left\{b_{n}\right\}$ satisfy:
$$
b_{n}=\left\{\begin{array}{ll}
a_{\frac{n+1}{2}}, & n \text { is odd; } \\
\sqrt{a_{n+1}}, & n \text { is even. }
\end{array}\right.
$$

If $\left\{b_{n}\right\}$ is a geometric sequence, and $a_{2}+b_{2}=108$, then the general term formula of the sequence $\left\{a_{n}\right\}$ is $\qquad$ .
4. $a_{n}=9^{n}$.

Since $\left\{b_{n}\right\}$ is a geometric sequence, its subsequence $\left\{b_{2 n-1}\right\}$ is also a geometric sequence.

And $b_{2 n-1}=a_{n}$, so $\left\{a_{n}\right\}$ is also a geometric sequence, with the common ratio $q$.
$$
\begin{array}{l}
\text { By } b_{1}=a_{1}, b_{2}=\sqrt{a_{3}}, b_{3}=a_{2} \\
\Rightarrow a_{3}=a_{1} a_{2} \Rightarrow a_{1}=q . \\
\text { Also } a_{2}+b_{2}=108 \text {, so } \\
q^{2}+q^{\frac{3}{2}}=108 \Rightarrow q=9 \Rightarrow a_{n}=9^{n} .
\end{array}
$$

Upon verification, $a_{n}=9^{n}$ satisfies the given conditions.