21. Determine the maximum number of different sets consisting of three terms which form an arithmetic progressions that can be chosen from a sequence of real numbers $a_{1}, a_{2}, \ldots, a_{101}$, where
$$
a_{1}<a_{2}<a_{3}<\cdots<a_{101} .
$$
21. Answer: 2500
Solution. First, for the following particular sequence, there are really 2500 different three-term arithmetic progressions which can be chosen from this sequence:
$$
1,2,3, \cdots, 101 \text {. }
$$

They are $s, i, 2 i-s$ for all integers $s, i$ with $1 \leq s<i \leq 51$ and $2 i-t, i, t$ for all integers i and $t$ with $52 \leq i<t \leq 101$.
Now we show that for any given sequence of real numbers $a_{1}<a_{2}<\ldots<a_{101}$, there are at most 2500 different three-term arithmetic progressions which can be chosen from this sequence.
Let $a_{s}, a_{i}, a_{4}$ represent a three-term arithmetic progression. It is clear that $2 \leq i \leq 100$. If $2 \leq i \leq 51$, then the first term $a_{8}$ has at most $i-1$ choices, as $s$ must be an index in $1,2, \cdots, i-1$. If $52 \leq i \leq 100$, then the third term $a_{t}$ has at most $101-i$ choices, as $t$ must be an index in $i+1, i+2, \cdots, 101$.
So the number of different three-term arithmetic progressions which can be chosen from this sequence is at most
$$
\sum_{i=2}^{51}(i-1)+\sum_{i=52}^{100}(101-i)=1+2+\cdots+50+1+2+\cdots+49=2500 .
$$