4. Given positive integers $a, b, c$ satisfy
$$
1<a<b<c, a+b+c=111, b^{2}=a c \text {. }
$$

then $b=$ $\qquad$
4. 36.

Let $(a, c)=d, a=a_{1} d, c=c_{1} d, a_{1}, c_{1}$ be positive integers, and $\left(a_{1}, c_{1}\right)=1, a_{1}<c_{1}$.
Then $b^{2}=a c=d^{2} a_{1} c_{1} \Rightarrow d^{2}\left|b^{2} \Rightarrow d\right| b$.
Let $b=b_{1} d\left(b_{1} \in \mathbf{Z}_{+}\right)$. Then $b_{1}^{2}=a_{1} c_{1}$.
Since $\left(a_{1}, c_{1}\right)=1$, $a_{1}, c_{1}$ are both perfect squares.
Let $a_{1}=m^{2}, c_{1}=n^{2}$. Then
$$
b_{1}=m n\left(m, n \in \mathbf{Z}_{+} \text {, and }(m, n)=1, m<n\right) \text {. }
$$

Also, $a+b+c=111$, so
$$
\begin{array}{l}
d\left(a_{1}+b_{1}+c_{1}\right)=111 \\
\Rightarrow d\left(m^{2}+n^{2}+m n\right)=111 .
\end{array}
$$

Notice that,
$$
m^{2}+n^{2}+m n \geqslant 1^{2}+2^{2}+1 \times 2=7 \text {. }
$$

Therefore, $d=1$ or 3.
If $d=1$, then $m^{2}+n^{2}+m n=111$.
By trial, only $m=1, n=10$ satisfy the equation, but in this case, $a=1$ (discard).
If $d=3$, then $m^{2}+n^{2}+m n=37$.
By trial, only $m=3, n=4$ satisfy the equation, in this case, $a=27, b=36, c=48$, which meets the requirements.
Therefore, $b=36$.