<s>[INST] Possible number of terms in an Arithmetic Progression The sum of the first $n$ $(n>1)$ terms of the A.P. is $153$ and the common difference is $2$. If the first term is an integer , then number of possible values of $n$ is 
$a)$ $3$
$b)$ $4$
$c)$ $5$
$d)$ $6$
My approach : I used the formula for the first $n$ terms of an A.P. to arrive at the following quadratic equation 
$n^2 + n(a-1) -153 = 0 $
Next up I realised that since we are talking about the number of terms , thus the 
possible values which n can take must be whole numbers. That is the discriminant of the above quadratic should yield a whole number in other words 
$ (a-1)^2 + 612 = y^2 $ for some y . 
However I am stuck at this point , as from here I am unable to figure out the number of such a's ( i.e. the initial terms of an AP ) which will complete the required pythagorean triplet
The answer mentioned is $5$
Please let me know , if I am doing a step wrong somewhere . Or If you have a better solution , that will be welcomed too. 
 [/INST] \begin{align}
   n^2 +(a-1)n - 153 &= 0 \\
   (n+u)(n-v) &= 0 \\
   n^2 + (u-v)n - uv &= 0
\end{align}
So you need two positive integers, say $u>v>0$, such that $uv=153$ and $u-v=a-1$. Which will have solution $n=v$.
There aren't that many possibilities
\begin{array}{|rr|r|rr|}
\hline
   u & v & u-v & a & n \\
\hline
   153 & 1 & 152 & 153 & 1 \\
    51 & 3 &  48 &  49 & 3 \\
    17 & 9 &   8 &   9 & 9 \\
\hline
\end{array}

Above I was assuming $a > 1$. If you allow $a$ to be a negative number, then the analysis changes a bit.
$$n^2 +(a-1)n - 153 = 0$$
The divisors of $153$ are $1,3,9,17,51,153$ We find the following.
\begin{array}{|l|rr|}
\hline
   \text{factors} & a & n\\ 
\hline
   (n-1)(n+153) = n^2+152n - 153 &  153 &   1 \\
   (n-3)(n+ 51) = n^2 +48n - 153 &   49 &   3 \\ 
   (n-9)(n+17)  = n^2  +8n - 153 &    9 &   9 \\
   (n-17)(n+9)  = n^2  -8n - 153 &   -7 &  17 \\
   (n-51)(n+3)  = n^2 -48n - 153 &  -47 &  51 \\
   (n-153)(n+1) = n^2-152n - 153 & -151 & 153 \\
\hline
\end{array}
</s>