2・13 Let $S=\{1,2, \cdots, n\}, A$ be an arithmetic sequence with at least two terms, a positive common difference, all of whose terms are in $S$, and adding any other element of $S$ to $A$ does not form an arithmetic sequence with the same common difference as $A$. Find the number of such $A$ (here, a sequence with only two terms is also considered an arithmetic sequence). $\quad$
［Solution］ Let the common difference of $A$ be $d$, then $1 \leqslant d \leqslant n-1$.
We discuss in two cases:
(1) Suppose $n$ is even, then
when $1 \leqslant d \leqslant \frac{n}{2}$, there are $d$ $A$s with common difference $d$;
when $\frac{n}{2}+1 \leqslant d \leqslant n-1$, there are $n-d$ $A$s with common difference $d$. Therefore, when $n$ is even, the total number of such $A$s is
$$\left(1+2+\cdots \frac{n-1}{2}\right)+\left\{1+2+\cdots+\left[n-\left(\frac{n}{2}+1\right)\right]\right\}=\frac{n}{4}^{2} \text { (cases) }$$
(2) Suppose $n$ is odd, then
when $1 \leqslant d \leqslant \frac{n-1}{2}$, there are $d$ $A$s with common difference $d$;
when $\frac{n+1}{2} \leqslant d \leqslant n-1$, there are $n-d$ $A$s with common difference $d$. Therefore, when $n$ is odd, the total number of such $A$s is
$$\left(1+2+\cdots+\frac{n-1}{2}\right)+\left(1+2+\cdots+\frac{n-1}{2}\right)=\frac{n^{2}-1}{4}(\text { cases })$$

Both cases can be unified as: the number of such $A$s is $\left[\frac{\dot{n}^{2}}{4}\right]$.