Arithmetc Progression containing odd terms Here is the question:

If for an AP of odd number of terms,the sum of all the terms is $\frac{15}{8}$ times the sum of the terms in odd places then find the number of terms in the AP.

my try:First of all i thought that in an odd AP there will be (2n+1) terms becuase (2n) terms will contain even number of terms where as there will be n+1 odd terms.
Then I equated the following equation
$\frac{2n+1}{2}[2a + 2nd]=\frac{15}{8}*\frac{n+1}{2}[2a+nd]$
But then I wondered there are three unknowns and one equation ,then how can i solve for $n$.So my question is that how can we solve for $n$ or $2n+1$ ?
 A: After posting the question a thought came to my mind that the first and the last terms are same for all terms as well as odd terms .So i instead used the below eqaution.
$\frac{2n+1}{2}[a+l]=\frac{15}{8}*\frac{n+1}{2}[a+l]$
Here $a , l $ are first and last terms.Further I solved for $n$ and it came out to be 7.So,total number of  terms $2n+1$ came out to be $15$.
A: First consider a constant progression, $t_n=1$. Then the ratio of the sums is $\dfrac{2n}{n+1}=\dfrac{15}8$ so that $\color{green}{n=15}$.
$$\frac{1+1+1+1+1+1+1+1+1+1+1+1+1+1+1}{1+1+1+1+1+1+1+1}=\frac{15}8.$$
This is compatible with a linear progression $t_n=n$, as
$$\frac{1+2+3+4+5+6+7+8+9+10+11+12+13+14+15}{1+3+5+7+9+11+13+15}=\frac{120}{64}=\frac{15}8.$$
By linearity, the property extends to any $t_n=a+bn$.
A: Denote $a_n = a_0 + nd$. Since $a_n$ is odd for any $n$, we deduce that $d$ is even and $a_0$ is odd, so denote $d = 2k$. Then we have $a_n = a_0 + 2 n k$. Also, $S_n$ of the first $n$ terms is $$a_1 + a_2 + \cdots + a_n = n a_0 + n (n + 1) k.$$ Let $m = [(n + 1)/2]$. Then the sum of the odd terms of the progression is $$a_1 + a_3 + \cdots + a_{2m - 1} = m a_0 + 2 m^2 k.$$ By the condition, we have $$8 n a_0 + 8 n (n + 1) k = 15 m a_0 + 30 m^2 k.$$ Thus, $n$ is odd, and denote it by $2m - 1$. The last equation then becomes $$(m - 8) (2 m k  + a_0) = 0.$$ Hence, $m = 8$ so $n = 15$. The number of terms in the progression is $15$.
