Combinatorics Sequence and Series Given $n$ is odd,number of ways in which $3$ numbers in AP can be selected from $1,2,3,4, \ldots, n$ is?
(I tried with some examples and I'm getting something like $$\frac{(n-1)^2}{4}$$ but not getting a direct combinatorial or algebraic technique.Please Help.)

If common difference is d. 
Then for $d=1$ we have $n-1*(3-1)=n-2$, 
$\qquad$ for $d=2$ we have $n-2*(3-1)=n-4$,
$\qquad$ for $d=3$ we have $n-3*(3-1)=n-6$,
And so on...
You can sum these?
