5. Define the sequence $\left\{a_{n}\right\}: a_{n}=4+n^{3}, n \in \mathbf{N}_{+}$. Let $d_{n}=\left(a_{n}, a_{n+1}\right)$, i.e., $d_{n}$ is the greatest common divisor of $a_{n}$ and $a_{n+1}$. Then the maximum value of $d_{n}$ is $\qquad$
5.433.

Given) $d_{n} 1\left(n^{3}+4,(n+1)^{3}+4\right)$, we know $d_{n} \mid\left(4+n^{3}, 3 n^{2}+3 n+1\right)$.
Thus, we have
$$
d_{n} \mid\left[-3\left(4+n^{3}\right)+n\left(3 n^{2}+3 n+1\right), 3 n^{2}+3 n+1\right] \text {, }
$$

which means
$$
d_{n} \mid\left(3 n^{2}+n-12,3 n^{2}+3 n+1\right) \text {. }
$$

Therefore, $d_{n} \mid \left(2 n+13,3 n^{2}+3 n+1\right)$.
Thus, $d_{n} \mid (33 n-2,2 n+13)$.
Hence, $d_{n} \mid [-2(33 n-2)+33(2 n+13)]$, which means $d_{n} \mid 433$.

Therefore, $\left(d_{n}\right)_{\text {max }} \leqslant 433$.
Let $n=\frac{27 \times 4^{2}-3 \times 4}{2}=210$.
From $4+\left(\frac{27 \times 4^{2}-3 \times 4}{2}\right)^{3}$
$$
=\left[\left(27 \times 4^{2}+1\right)^{2}-3\left(27 \times 4^{2}+1\right) \times 13+3 \times 13^{2}-5\right] \times \frac{433}{8}
$$

we know $433 \mid \left(4+210^{3}\right)$.
Thus, $433 \mid \left[4+211^{3}-\left(4+210^{3}\right)\right]$.
Therefore, $\left(d_{n}\right)_{\max }=433$.