Math Lab
Home/Class X/Ch 5/Sum of the first n terms of an AP

Sum of the first nn terms of an AP

A famous schoolboy story claims that when young Gauss was asked to add 1+2+3++1001 + 2 + 3 + \ldots + 100, he wrote 50505050 within seconds. His trick , pair the first and last terms, then the second and second-last, and so on , gives the formula we need.

The formula

For an AP with first term aa, common difference dd, and nn terms, the sum of the first nn terms is Sn=n2[2a+(n1)d].\boxed{S_n = \frac{n}{2} \bigl[2 a + (n - 1) d\bigr].}

Equivalently, if the last term is =a+(n1)d\ell = a + (n - 1) d, Sn=n2(a+).S_n = \frac{n}{2} (a + \ell).

Derivation (Gauss trick)

Write the sum forwards and backwards: Sn=a+(a+d)+(a+2d)++,S_n = a + (a + d) + (a + 2 d) + \ldots + \ell, Sn=+(d)+(2d)++a.S_n = \ell + (\ell - d) + (\ell - 2 d) + \ldots + a. Add term by term: 2Sn=(a+)+(a+)++(a+)=n(a+).2 S_n = (a + \ell) + (a + \ell) + \ldots + (a + \ell) = n (a + \ell). So Sn=n2(a+)S_n = \dfrac{n}{2} (a + \ell).

Substituting =a+(n1)d\ell = a + (n - 1) d gives the equivalent formula Sn=n2[2a+(n1)d].S_n = \frac{n}{2} \bigl[2 a + (n - 1) d\bigr].

When to use which form

  • Sn=n2(a+)S_n = \dfrac{n}{2}(a + \ell): ideal when aa and \ell are given (and so we just need nn).
  • Sn=n2[2a+(n1)d]S_n = \dfrac{n}{2}[2 a + (n - 1) d]: ideal when aa and dd are given (so we don't have to compute the last term first).

Both are equivalent , choose whichever leads to less arithmetic.

A useful corollary: the nnth term and the sum are linked by an=SnSn1.a_n = S_n - S_{n - 1}. This is occasionally handy: if you are given the sum formula and need the nnth term, just subtract.

Worked examples

Example 1. Sum of the first 3030 terms of 5,9,13,17,5, 9, 13, 17, \ldots.

a=5,d=4,n=30a = 5, d = 4, n = 30. S30=302[25+294]=15[10+116]=15126=1890S_{30} = \dfrac{30}{2}[2 \cdot 5 + 29 \cdot 4] = 15 \cdot [10 + 116] = 15 \cdot 126 = 1890.

Example 2. Find the sum of the first 5050 natural numbers.

1+2++50=502(1+50)=2551=12751 + 2 + \ldots + 50 = \dfrac{50}{2}(1 + 50) = 25 \cdot 51 = 1275.

Example 3. Find the sum of all two-digit multiples of 33.

Two-digit multiples of 33: 12,15,,9912, 15, \ldots, 99. AP with a=12,d=3a = 12, d = 3.

Number of terms: a+(n1)d=9912+3(n1)=99n=30a + (n - 1) d = 99 \Rightarrow 12 + 3(n - 1) = 99 \Rightarrow n = 30.

Sum =302(12+99)=15111=1665= \dfrac{30}{2}(12 + 99) = 15 \cdot 111 = 1665.

Example 4. How many terms of the AP 9,17,25,9, 17, 25, \ldots are required to give a sum of 636636?

a=9,d=8a = 9, d = 8. Sn=n2[18+8(n1)]=n2(8n+10)=n(4n+5)S_n = \dfrac{n}{2}[18 + 8(n - 1)] = \dfrac{n}{2}(8 n + 10) = n(4 n + 5).

Set 4n2+5n=6364n2+5n636=04 n^2 + 5 n = 636 \Rightarrow 4 n^2 + 5 n - 636 = 0. Discriminant =25+10176=10201=1012= 25 + 10176 = 10201 = 101^2. n=(5+101)/8=12n = (-5 + 101)/8 = 12.

Example 5. The sum of the first nn terms of an AP is 4n2+5n4 n^2 + 5 n. Find the nnth term.

an=SnSn1=(4n2+5n)(4(n1)2+5(n1))=(4n2+5n)(4n28n+4+5n5)=(4n2+5n)(4n23n1)=8n+1a_n = S_n - S_{n-1} = (4 n^2 + 5 n) - (4 (n - 1)^2 + 5 (n - 1)) = (4 n^2 + 5 n) - (4 n^2 - 8 n + 4 + 5 n - 5) = (4 n^2 + 5 n) - (4 n^2 - 3 n - 1) = 8 n + 1.

So an=8n+1a_n = 8 n + 1, an AP with a=9,d=8a = 9, d = 8. (And indeed S1=a1=9S_1 = a_1 = 9; check S1=4+5=9S_1 = 4 + 5 = 9 ✓.)

Try it yourself

  1. Find S15S_{15} for 1,4,7,10,1, 4, 7, 10, \ldots.
  2. Find the sum of first 100100 positive integers.
  3. Sum of all odd numbers from 11 to 9999.
  4. Sum of all multiples of 77 between 11 and 100100.
  5. The sum of the first nn terms of an AP is 3n2+2n3 n^2 + 2 n. Find the AP.
  6. If SnS_n for an AP is n2(3n+5)\dfrac{n}{2}(3 n + 5), find the AP.
  7. How many terms of the AP 24,21,18,24, 21, 18, \ldots must be taken so that the sum is 7878?
  8. Find the sum of all three-digit numbers divisible by 99.
  9. The first term of an AP is 55, the last term is 4545, and the sum is 400400. Find the number of terms and the common difference.
  10. A man arranges to pay a debt of ₹36003600 by 4040 instalments which form an AP. When 3030 instalments are paid he dies, leaving one-third of the debt unpaid. Find the value of the first instalment.

Pitfalls / Insight

  • Don't forget the n/2n/2 in front. The most common error is writing Sn=2a+(n1)dS_n = 2 a + (n - 1) d (missing the multiplier).
  • For "how many terms", the quadratic in nn should give a positive integer , reject negatives or fractions.
  • For "sum of all multiples" in a range, first identify the AP, then count terms, then sum.

Insight. Once you have aa and dd, both the nnth term and the sum are one-line computations. Spend your effort getting aa and dd from the problem; the rest is arithmetic.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Sum of n terms
6 questions · pick the best answer
Q1

Sn=n/2[2a+(n1)d]S_n = n/2 [2a + (n-1)d]. For a=1,d=4,n=10a = 1, d = 4, n = 10:

Q2

Sum of first 100100 natural numbers:

Q3

Sum of all odd numbers from 11 to 9999:

Q4

If Sn=3n2+2nS_n = 3n^2 + 2n, then an=a_n = :

Q5

Sum of all multiples of 77 from 11 to 100100:

Q6

How many terms of 24,21,18,24, 21, 18, \ldots give sum 7878?