S8=64
Sn=n2(2a+(n−1)d)
The first and the last terms of an AP are 17 and 350 respectively. If the common difference is 9, then find the number of terms in the AP and their sum.