Let first term of AP = a
common difference = d
number of terms = n
Given that sum of first 7 term of AP = 49
n2[2a+(n−1)∗d]=49
72∗[2a+(7−1)∗d]=49
72∗[2a+6d]=49
12∗(2a+6d)=7
22∗a+3d=7
a+3d=7...............1
Again given sum of first 17 term of AP = 289
172∗2a+(17−1)∗d=289
12∗2a+16∗d=17 (when 17 and 289 is divided by 17)
22∗a+8d=17
a+8d=17...............2
After solving equation 1 and 2, we get
a=1 and d=2
Now sum of n terms of AP = n2∗2a+(n−1)∗d
n2∗2∗1+(n−1)∗2
n2∗(2+2n−2)
n2∗2n
n2
So sum of first n terms of AP = n2