Given that,
a = 17
l = 350
d = 9
Let there be n terms in the A.P.
l = a + (n − 1) d
350 = 17 + (n − 1)9
333 = (n − 1)9
(n − 1) = 37
n = 38
Sn=n2(a+l)S38=382(17+350)=19×367=6973
Thus, this A.P contains 38 terms and the sum of the terms of this A.P is 6973.