Given that n is odd,then number of ways in which three numbers are in A.P can be selected from $1,2,3,...n$ is

853 Views Asked by At

Given that n is odd,then number of ways in which three numbers are in A.P can be selected from $1,2,3,...n$ is

My interpretation:
Let n = 2m+1
According to me,this question is asking pairs of three numbers in A.P when it's common difference is $1,2,3,...,m$
E.g.
Number of pairs when common difference is $1$ is
${(1,2,3)},{(2,3,4)},{(3,4,5)},{(4,5,6)},.....{(2m-1,2m,2m+1)}$ = $2m-1$
Number of pairs when common difference is $2$ is
${(1,3,5)},{(3,5,7)},{(5,7,9)},{(7,9,11)},....{((2m-3)(2m-1)(2m+1))}$ = $?$
Number of pairs when common difference is $3$ is
${(1,4,7)},{(4,7,10)},....{(2m-5)(2m-2)(2m-1)}$ = $?$
....
....
...
....
Number of pairs when common difference is $m$ is
${(1,m,2m)}$ = $1$

Problem I am having in counting number of pairs when common difference = $2,3,4,5....(m-1)$. How can I count number of A.P's.

1

There are 1 best solutions below

0
On

For three numbers in AP, the smallest and largets have the same parity. And vice versa, two integres of same parity together with their arithmetic mean are in AP. Hence the question boils down to counting the ways to pick two odd numbers or two even numbers. For $n=2m+1$, there are $m$ even and $m+1$ odd numbers to choose from. Thus we arrive at $${m+1\choose 2}+{m\choose 2}=\frac{m(m+1)}2+\frac {m(m-1)}2=m^2. $$