In how many ways can three distinct numbers be chosen from the set $\{1,2,3,4,\dots,2n\}$ such that the numbers are in increasing arithmetic progression?
Progress: The common difference for the selected numbers can lie between 1 to $2n/3$. So it seems I need to work for every common difference from $1$ to $2n/3$. Is this fine?
The number of progressions $\{a_1,a_2,a_3\}$ such that $a_2=k$ is:
so the total number is $$S=\sum_{k=2}^n (k-1)+\sum_{k=n+1}^{2n-1} (2n-k)$$
The first sum is $1+2+\ldots+(n-1)=\frac{n^2-n}2$, and the second sum is the same, but in the reverse order. This gives $$S=n^2-n$$
Another solution:
We can count how many AP's with difference $d$ there are. If the first term is $1$, the last is $1+2d$, so there are $2n-(1+2d)+1=2n-2d$ of such AP's. But $d$ can be any integer from $1$ to $n-1$, so $$S=\sum_{d=1}^{n-1}(2n-2d)=\sum_{k=1}^{n-1} 2k=n^2-n$$