4. Let $A_{1} A_{2} \cdots A_{21}$ be a regular 21-sided polygon inscribed in a circle. Choose $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$
$(2014$, Sichuan Province Junior High School Mathematics Competition)
Among the 21 vertices of a regular 21-gon, there are 10 different distances between any two points, given by
$$
\frac{n(n-1)}{2} \leqslant 10 \Rightarrow n \leqslant 5 \text {. }
$$

When $n=5$, the distances between the points $A_{1} 、 A_{4} 、 A_{5} 、 A_{10} 、 A_{12}$ are all different, thus, the maximum value of $n$ is 5.