4. Find all positive integers $n$, such that there exists a convex $n$-gon, whose interior angles are consecutive positive integers.
4. $n=3,5,9,15,16$.

Let the maximum internal angle of a convex $n$-sided polygon be $x (x < 180)$. According to the problem, we have
$$
\begin{array}{l}
180(n-2)=n x-\frac{n(n-1)}{2} \\
\Rightarrow n(180-x)+\frac{n(n-1)}{2}=360 \\
\Rightarrow \frac{n(n-1)}{2}<360 \\
\Rightarrow 3 \leqslant n \leqslant 27 .
\end{array}
$$

If $n$ is odd, both sides of equation (1) are divisible by $n$. Considering the positive odd divisors of 360 are $1, 3, 5, 9, 15, 45$, we have
$$
n=3,5,9,15 \text {. }
$$

If $n$ is even, both sides of equation (1) are divisible by $\frac{n}{2}$ but not by $n$, meaning 360 is not a multiple of $n$, but 720 is a multiple of $n$, hence $n=16$.

Substituting $n=3,5,9,15,16$ into equation (1), we can solve for the corresponding $x$, thus all are consistent with the problem.