For an arithmetic sequence with initial value #a# and a difference between terms of #d#

the sum of the first #n# terms is given by the formula

#color(white)("XXX")Sigma = n/2*(2color(cyan)(a)+(n-1)color(green)(d))#

For the given sequence

#color(white)("XXX")color(cyan)(a=1)#

and

#color(white)("XXX")color(green)(d=2)#

We are told that the required sum is #961#

So

#color(white)("XXX")961=n/2*(2(color(cyan)(1))+(n-1)(color(green)(2)))#

#color(white)("XXX")961=n/color(red)(cancel(color(black)(2)))*color(red)(cancel(color(black)(2))) +n/color(blue)(cancel(color(black)(2)))(n-1)(color(blue)(cancel(color(black)(2))))#

#color(white)("XXX")961 = n+n^2 - n#

#color(white)("XXX")n^2 =961#

#color(white)("XXX")n=31#