10. Let $S=\{1,2,3, \cdots, n\}, A$ be an arithmetic sequence with at least two terms, a positive common difference, and all terms 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, sequences with only two terms are also considered arithmetic sequences).
10. Let the common difference of $A$ be $d$, then $1 \leqslant d \leqslant n-1$, we consider two cases:
(1) Suppose $n$ is even. When $1 \leqslant d \leqslant \frac{n}{2}$, there are $d$ arithmetic sequences $A$ with common difference $d$; when $\frac{n}{2}+1 \leqslant d \leqslant n-1$, there are $(n-d)$ arithmetic sequences $A$ with common difference $d$, so the total number of such sequences $A$ is $1+2+\cdots+\frac{n}{2}+1+2+\cdots+\left(\frac{n}{2}-1\right)=\frac{n^{2}}{4}$ (sequences);
(2) Suppose $n$ is odd. When $1 \leqslant d \leqslant \frac{n-1}{2}$, there are $d$ arithmetic sequences $A$ with common difference $d$; when $\frac{n+1}{2} \leqslant d \leqslant n-1$, there are $n-d$ arithmetic sequences $A$ with common difference $d$, so the total number of such sequences $A$ is $\left(1+2+\cdots+\frac{n-1}{2}\right)+\left(1+2+\cdots+\frac{n+1}{2}\right)=\frac{n^{2}-1}{4}$
We can unify the two cases as: there are $\left[\frac{n^{2}}{4}\right]$ such sequences $A$.