If the sum of first 7 terms of an AP is 49 and that of 17 terms is 289, find the sum of first \(n\) terms.
\(S_n = n^2\)
Recall formulas for an AP:
Sum of first \(n\) terms: \[S_n = \frac{n}{2}[2a + (n - 1)d]\]
where \(a\) is the first term and \(d\) is the common difference.
Given \(S_7 = 49\):
\[S_7 = \frac{7}{2}[2a + 6d] = 49\]
Multiply both sides by 2:
\[7(2a + 6d) = 98\]
Divide by 7:
\[2a + 6d = 14\]
Divide by 2:
\[a + 3d = 7 \quad ...(1)\]
Given \(S_{17} = 289\):
\[S_{17} = \frac{17}{2}[2a + 16d] = 289\]
Multiply both sides by 2:
\[17(2a + 16d) = 578\]
Divide by 17:
\[2a + 16d = 34\]
Divide by 2:
\[a + 8d = 17 \quad ...(2)\]
Subtract (1) from (2):
\[(a + 8d) - (a + 3d) = 17 - 7\]
\[a + 8d - a - 3d = 10\]
\[5d = 10 \Rightarrow d = 2\]
Substitute \(d = 2\) into (1):
\[a + 3(2) = 7 \Rightarrow a + 6 = 7 \Rightarrow a = 1\]
Now use the sum formula with \(a = 1\) and \(d = 2\):
\[S_n = \frac{n}{2}[2a + (n - 1)d] = \frac{n}{2}[2 \cdot 1 + (n - 1) \cdot 2]\]
Simplify inside the bracket:
\[2 + 2(n - 1) = 2 + 2n - 2 = 2n\]
So,
\[S_n = \frac{n}{2} \cdot 2n = n^2\]
Conclusion: The sum of the first \(n\) terms of the AP is \(\boxed{S_n = n^2}\).