4. Let $p, \alpha, m \in \mathbf{Z}_{+}$, denote $p^{\alpha} \| m$ to mean $p^{\alpha} \mid m$, but $p^{\alpha+1} \nmid m$. For any positive integer $n$, the maximum value of the positive integer $\alpha$ satisfying $2^{\alpha} \|\left(3^{n}+1\right)$ is $\qquad$
4. 1 .

Notice that the square of an odd number is congruent to 1 modulo 4.
If $n=2 k\left(k \in \mathbf{Z}_{+}\right)$, then
$$
3^{n}+1=3^{2 k}+1=\left(3^{k}\right)^{2}+1 \equiv 2(\bmod 4) \text {. }
$$

At this point, $2 \|\left(3^{n}+1\right)$.
If $n=2 k+1\left(k \in \mathbf{Z}_{+}\right)$, then
$$
\begin{array}{l}
3^{n}+1=3^{2 k+1}+1=3\left(3^{k}\right)^{2}+1 \\
\equiv 3 \times 1+1=4(\bmod 8) .
\end{array}
$$

At this point, $2^{2} \|\left(3^{n}+1\right)$.
Therefore, for any positive integer $n$, the maximum value of $\alpha$ is 1.