4. Let $A_{1} A_{2} \cdots A_{21}$ be a regular 21-sided polygon inscribed in a circle. Select $n$ different vertices from $A_{1}, A_{2}, \cdots, A_{21}$ and color them red, such that the distances between any two of these $n$ red points are all different. Then the maximum value of the positive integer $n$ is $\qquad$ .
4.5.

By symmetry, we know that there are only 10 possible distances.
$$
\text{Thus } \frac{n(n-1)}{2} \leqslant 10 \Rightarrow n \leqslant 5 \text{.}
$$

When $n=5$, by coloring the points $A_{1} 、 A_{4} 、 A_{5} 、 A_{10} 、 A_{12}$ red, we know that the distances between these five points are all different. Therefore, the maximum value of $n$ is 5.