Adding many terms of an AP one by one is slow. There's a beautiful shortcut. The sum of the first n terms of an AP, written Sn, is:
Sn=2n[2a+(n−1)d]
where a is the first term, d the common difference, and n the number of terms.
The story behind it
Legend says the young mathematician Gauss added 1+2+⋯+100 instantly by pairing the first and last terms. Each pair sums to the same value, and this idea gives the formula.
Key Point: Sn=2n[2a+(n−1)d]. You need a, d, and n.
[Board Important] Don't confuse Sn (sum of n terms) with an (the nth term). Sn adds up all terms up to the nth.

When the last term l is known, there's a simpler version:
Sn=2n(a+l)
This says: the sum equals the number of terms times the average of the first and last term.
Why it's the same
Since l=an=a+(n−1)d, substituting into 2n(a+l) recovers the first formula.
Worked outline
Find 1+2+3+⋯+100: here a=1, l=100, n=100.
S100=2100(1+100)=50×101=5050.
Key Point: Use Sn=2n(a+l) when the last term is given; use Sn=2n[2a+(n−1)d] when d is given.
[Board Important] The 'first + last' average formula is the fastest when you know the last term — a real time-saver.
Finding a Term from the Sum
There's a neat link between sums and terms:
an=Sn−Sn−1
That is, the nth term equals the sum of the first n terms minus the sum of the first (n−1) terms.
If a problem gives Sn=3n2+5n, then:
- S1=a1=8 (first term).
- an=Sn−Sn−1 gives the general term, and d follows.
Key Point: an=Sn−Sn−1 lets you recover terms (and a, d) directly from a sum formula.
[Board Important] If Sn is a quadratic in n (like 3n2+5n), the list is automatically an AP, and the coefficient pattern tells you a and d.
Finding the Number of Terms from a Sum
Often a problem gives the sum and asks how many terms produce it. Set Sn equal to the given sum — this gives a quadratic in n to solve.
Worked outline
How many terms of 24,21,18,… give a sum of 78? Here a=24, d=−3.
2n[48+(n−1)(−3)]=78⇒n(51−3n)=156⇒3n2−51n+156=0⇒n2−17n+52=0.
Factoring: (n−4)(n−13)=0, so n=4 or n=13. Both can be valid (the AP turns negative and the later terms cancel out).
Key Point: Setting Sn equal to a value gives a quadratic in n. Sometimes two values of n both work — interpret carefully.
[Board Important] Reject any non-positive or non-integer n. If both roots are valid positive integers, mention both.
Solved Examples
Example 1: Sum using a, d, n
Find the sum of the first 22 terms of 8,3,−2,…
Solution:
- a=8, d=−5, n=22.
- S22=222[16+21(−5)]=11[16−105]=11(−89)=−979.
Final Answer: −979.
Takeaway: Apply Sn=2n[2a+(n−1)d] carefully with signs.
Example 2: Sum using first and last
Find 1+2+3+⋯+100.
Solution:
- a=1, l=100, n=100.
- S100=2100(1+100)=50×101=5050.
Final Answer: 5050.
Takeaway: Sn=2n(a+l) is fastest with a known last term.
Example 3: Sum of first 1000 positive integers
Find the sum of the first 1000 positive integers.
Solution:
- a=1, l=1000, n=1000.
- S=21000(1+1000)=500×1001=500500.
Final Answer: 500500.
Takeaway: Same average-based formula scales to any range.
Example 4: How many terms give a sum?
How many terms of 24,21,18,… are needed to give a sum of 78?
Solution:
- a=24, d=−3. 2n[48+(n−1)(−3)]=78.
- n(51−3n)=156⇒3n2−51n+156=0⇒n2−17n+52=0.
- (n−4)(n−13)=0⇒n=4 or 13.
Final Answer: 4 or 13 terms.
Takeaway: Setting Sn=78 gives a quadratic; both positive roots are valid here.
Example 5: Sum of first n natural numbers
Find the sum of the first n natural numbers in terms of n.
Solution:
- a=1, l=n, number of terms =n.
- Sn=2n(1+n)=2n(n+1).
Final Answer: 2n(n+1).
Takeaway: The famous formula 1+2+⋯+n=2n(n+1).
Example 6: Find an from Sn
If Sn=3n2+5n, find the nth term and the common difference.
Solution:
- an=Sn−Sn−1=(3n2+5n)−[3(n−1)2+5(n−1)].
- =3n2+5n−(3n2−6n+3+5n−5)=6n+2.
- a1=8, a2=14, so d=6.
Final Answer: an=6n+2, d=6.
Takeaway: an=Sn−Sn−1 recovers the term formula.
Example 7: Sum of first 20 odd numbers
Find the sum of the first 20 odd natural numbers.
Solution:
- AP 1,3,5,…: a=1, d=2, n=20.
- S20=220[2+19(2)]=10[2+38]=10(40)=400.
Final Answer: 400.
Takeaway: The sum of the first n odd numbers is n2 (here 202=400).
Example 8: Find n for a given sum (one root)
How many terms of the AP 9,17,25,… must be taken to give a sum of 636?
Solution:
- a=9, d=8. 2n[18+(n−1)8]=636.
- n(8n+10)=1272⇒8n2+10n−1272=0⇒4n2+5n−636=0.
- (4n+53)(n−12)=0⇒n=12 (reject the negative root).
Final Answer: 12 terms.
Takeaway: Reject the negative/fractional root; only n=12 is admissible.
Example 9: Sum given two conditions
If the sum of the first 14 terms of an AP is 1050 and the first term is 10, find the 20th term.
Solution:
- S14=214[2(10)+13d]=7[20+13d]=1050⇒20+13d=150⇒d=10.
- a20=10+19(10)=200.
Final Answer: a20=200.
Takeaway: Use the sum to find d, then the nth-term formula.
Example 10: Sum of multiples
Find the sum of all multiples of 7 lying between 1 and 100.
Solution:
- Multiples: 7,14,…,98. Here a=7, d=7, l=98.
- Number of terms: 98=7+(n−1)7⇒n=14.
- S14=214(7+98)=7×105=735.
Final Answer: 735.
Takeaway: First find n, then apply Sn=2n(a+l).