(4) (30 points) Given the sequence $\left\{a_{n}\right\}$ satisfies $a_{1}=\frac{1}{2}, a_{n}=$ $2 a_{n} a_{n+1}+3 a_{n+1}\left(n \in \mathbf{N}^{*}\right)$.
(1) Find the general term formula of the sequence $\left\{a_{n}\right\}$;
(2) If the sequence $\left\{b_{n}\right\}$ satisfies $b_{n}=1+\frac{1}{a_{n}}\left(n \in \mathbf{N}^{*}\right)$, and for any positive integer $n(n \geqslant 2)$, the inequality $\sum_{k=1}^{n} \frac{1}{n+\log _{3} b_{k}}>\frac{m}{24}$ always holds, find the maximum value of the integer $m$.
(4) (1) If there exists $a_{l}=0\left(l \in \mathbf{N}^{*}\right)$, then from $a_{n-1}=2 a_{n-1} a_{n}+3 a_{n}$ we know, $a_{l-1}=$ 0. Proceeding in this manner, $a_{l-2}=0, a_{l-3}=0, \cdots, a_{1}=0$, which contradicts $a_{1}=\frac{1}{2}$. Therefore, $a_{n} \neq 0\left(n \in \mathbf{N}^{*}\right)$.
Thus, from $a_{n}=2 a_{n} a_{n+1}+3 a_{n+1}$, we get $\frac{1}{a_{n+1}}-\frac{3}{a_{n}}=2$, i.e.,
$$
\frac{1}{a_{n+1}}+1=3\left(\frac{1}{a_{n}}+1\right) \text {. }
$$

Therefore, $\left\{\frac{1}{a_{n}}+1\right\}$ is a geometric sequence with the first term 3 and common ratio 3.
Thus, $\frac{1}{a_{n}}+1=3^{n}$, i.e., $a_{n}=\frac{1}{3^{n}-1}\left(n \in \mathbf{N}^{*}\right)$.
(2) From (1), we have $b_{n}=1+\frac{1}{a_{n}}=3^{n}$. Therefore, $\log _{3} b_{k}=k(k=1,2, \cdots)$.

Thus, the inequality $\sum_{k=1}^{n} \frac{1}{n+\log _{3} b_{k}}>\frac{m}{24}$ is equivalent to
$$
\frac{1}{n+1}+\frac{1}{n+2}+\cdots+\frac{1}{n+n}>\frac{m}{24} \text {. }
$$

Let $f(n)=\frac{1}{n+1}+\frac{1}{n+2}+\cdots+\frac{1}{n+n}$, then
$$
\begin{aligned}
f(n+1)-f(n) & =\frac{1}{2 n+1}+\frac{1}{2 n+2}-\frac{1}{n+1} \\
& =\frac{1}{2 n+1}-\frac{1}{2 n+2}>0,
\end{aligned}
$$

Therefore, $f(n)$ is monotonically increasing.
Thus, $f(n)_{\min }=f(2)=\frac{1}{3}+\frac{1}{4}=\frac{7}{12}$.
Hence, $\frac{7}{12}>\frac{m}{24}$, i.e., $m<14$.
Therefore, the maximum value of the integer $m$ is 13.