The Sum Formula

Adding many terms of an AP one by one is slow. There's a beautiful shortcut. The sum of the first nn terms of an AP, written SnS_n, is:

Sn=n2[2a+(n1)d]S_n = \frac{n}{2}\left[2a + (n - 1)d\right]

where aa is the first term, dd the common difference, and nn the number of terms.

The story behind it

Legend says the young mathematician Gauss added 1+2++1001 + 2 + \dots + 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=n2[2a+(n1)d]S_n = \dfrac{n}{2}[2a + (n-1)d]. You need aa, dd, and nn.

[Board Important] Don't confuse SnS_n (sum of nn terms) with ana_n (the nnth term). SnS_n adds up all terms up to the nnth.

A staircase of five bars of heights 2, 4, 6, 8, 10 (an AP) with a reversed copy stacked on top so every column has the same height a + l = 12; together the two copies give 2S = n(a + l) = 5 x 12 = 60, so the sum S = 30.

The Alternative Sum Formula

When the last term ll is known, there's a simpler version:

Sn=n2(a+l)S_n = \frac{n}{2}(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+(n1)dl = a_n = a + (n-1)d, substituting into n2(a+l)\dfrac{n}{2}(a + l) recovers the first formula.

Worked outline

Find 1+2+3++1001 + 2 + 3 + \dots + 100: here a=1a = 1, l=100l = 100, n=100n = 100. S100=1002(1+100)=50×101=5050.S_{100} = \frac{100}{2}(1 + 100) = 50 \times 101 = 5050.

Key Point: Use Sn=n2(a+l)S_n = \dfrac{n}{2}(a + l) when the last term is given; use Sn=n2[2a+(n1)d]S_n = \dfrac{n}{2}[2a + (n-1)d] when dd 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=SnSn1a_n = S_n - S_{n-1}

That is, the nnth term equals the sum of the first nn terms minus the sum of the first (n1)(n-1) terms.

When SnS_n is given as a formula

If a problem gives Sn=3n2+5nS_n = 3n^2 + 5n, then:

  • S1=a1=8S_1 = a_1 = 8 (first term).
  • an=SnSn1a_n = S_n - S_{n-1} gives the general term, and dd follows.

Key Point: an=SnSn1a_n = S_n - S_{n-1} lets you recover terms (and aa, dd) directly from a sum formula.

[Board Important] If SnS_n is a quadratic in nn (like 3n2+5n3n^2 + 5n), the list is automatically an AP, and the coefficient pattern tells you aa and dd.

Finding the Number of Terms from a Sum

Often a problem gives the sum and asks how many terms produce it. Set SnS_n equal to the given sum — this gives a quadratic in nn to solve.

Worked outline

How many terms of 24,21,18,24, 21, 18, \dots give a sum of 78? Here a=24a = 24, d=3d = -3. n2[48+(n1)(3)]=78n(513n)=1563n251n+156=0n217n+52=0.\frac{n}{2}[48 + (n-1)(-3)] = 78 \Rightarrow n(51 - 3n) = 156 \Rightarrow 3n^2 - 51n + 156 = 0 \Rightarrow n^2 - 17n + 52 = 0. Factoring: (n4)(n13)=0(n - 4)(n - 13) = 0, so n=4n = 4 or n=13n = 13. Both can be valid (the AP turns negative and the later terms cancel out).

Key Point: Setting SnS_n equal to a value gives a quadratic in nn. Sometimes two values of nn both work — interpret carefully.

[Board Important] Reject any non-positive or non-integer nn. If both roots are valid positive integers, mention both.

Solved Examples

Example 1: Sum using aa, dd, nn

Find the sum of the first 22 terms of 8,3,2,8, 3, -2, \dots

Solution:

  1. a=8a = 8, d=5d = -5, n=22n = 22.
  2. S22=222[16+21(5)]=11[16105]=11(89)=979S_{22} = \dfrac{22}{2}[16 + 21(-5)] = 11[16 - 105] = 11(-89) = -979.

Final Answer: 979-979.

Takeaway: Apply Sn=n2[2a+(n1)d]S_n = \dfrac{n}{2}[2a + (n-1)d] carefully with signs.

Example 2: Sum using first and last

Find 1+2+3++1001 + 2 + 3 + \dots + 100.

Solution:

  1. a=1a = 1, l=100l = 100, n=100n = 100.
  2. S100=1002(1+100)=50×101=5050S_{100} = \dfrac{100}{2}(1 + 100) = 50 \times 101 = 5050.

Final Answer: 5050.

Takeaway: Sn=n2(a+l)S_n = \dfrac{n}{2}(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:

  1. a=1a = 1, l=1000l = 1000, n=1000n = 1000.
  2. S=10002(1+1000)=500×1001=500500S = \dfrac{1000}{2}(1 + 1000) = 500 \times 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,24, 21, 18, \dots are needed to give a sum of 78?

Solution:

  1. a=24a = 24, d=3d = -3. n2[48+(n1)(3)]=78\dfrac{n}{2}[48 + (n-1)(-3)] = 78.
  2. n(513n)=1563n251n+156=0n217n+52=0n(51 - 3n) = 156 \Rightarrow 3n^2 - 51n + 156 = 0 \Rightarrow n^2 - 17n + 52 = 0.
  3. (n4)(n13)=0n=4(n - 4)(n - 13) = 0 \Rightarrow n = 4 or 1313.

Final Answer: 4 or 13 terms.

Takeaway: Setting Sn=78S_n = 78 gives a quadratic; both positive roots are valid here.

Example 5: Sum of first nn natural numbers

Find the sum of the first nn natural numbers in terms of nn.

Solution:

  1. a=1a = 1, l=nl = n, number of terms =n= n.
  2. Sn=n2(1+n)=n(n+1)2S_n = \dfrac{n}{2}(1 + n) = \dfrac{n(n+1)}{2}.

Final Answer: n(n+1)2\dfrac{n(n+1)}{2}.

Takeaway: The famous formula 1+2++n=n(n+1)21 + 2 + \dots + n = \dfrac{n(n+1)}{2}.

Example 6: Find ana_n from SnS_n

If Sn=3n2+5nS_n = 3n^2 + 5n, find the nnth term and the common difference.

Solution:

  1. an=SnSn1=(3n2+5n)[3(n1)2+5(n1)]a_n = S_n - S_{n-1} = (3n^2 + 5n) - [3(n-1)^2 + 5(n-1)].
  2. =3n2+5n(3n26n+3+5n5)=6n+2= 3n^2 + 5n - (3n^2 - 6n + 3 + 5n - 5) = 6n + 2.
  3. a1=8a_1 = 8, a2=14a_2 = 14, so d=6d = 6.

Final Answer: an=6n+2a_n = 6n + 2, d=6d = 6.

Takeaway: an=SnSn1a_n = S_n - S_{n-1} recovers the term formula.

Example 7: Sum of first 20 odd numbers

Find the sum of the first 20 odd natural numbers.

Solution:

  1. AP 1,3,5,1, 3, 5, \dots: a=1a = 1, d=2d = 2, n=20n = 20.
  2. S20=202[2+19(2)]=10[2+38]=10(40)=400S_{20} = \dfrac{20}{2}[2 + 19(2)] = 10[2 + 38] = 10(40) = 400.

Final Answer: 400.

Takeaway: The sum of the first nn odd numbers is n2n^2 (here 202=40020^2 = 400).

Example 8: Find nn for a given sum (one root)

How many terms of the AP 9,17,25,9, 17, 25, \dots must be taken to give a sum of 636?

Solution:

  1. a=9a = 9, d=8d = 8. n2[18+(n1)8]=636\dfrac{n}{2}[18 + (n-1)8] = 636.
  2. n(8n+10)=12728n2+10n1272=04n2+5n636=0n(8n + 10) = 1272 \Rightarrow 8n^2 + 10n - 1272 = 0 \Rightarrow 4n^2 + 5n - 636 = 0.
  3. (4n+53)(n12)=0n=12(4n + 53)(n - 12) = 0 \Rightarrow n = 12 (reject the negative root).

Final Answer: 12 terms.

Takeaway: Reject the negative/fractional root; only n=12n = 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:

  1. S14=142[2(10)+13d]=7[20+13d]=105020+13d=150d=10S_{14} = \dfrac{14}{2}[2(10) + 13d] = 7[20 + 13d] = 1050 \Rightarrow 20 + 13d = 150 \Rightarrow d = 10.
  2. a20=10+19(10)=200a_{20} = 10 + 19(10) = 200.

Final Answer: a20=200a_{20} = 200.

Takeaway: Use the sum to find dd, then the nth-term formula.

Example 10: Sum of multiples

Find the sum of all multiples of 7 lying between 1 and 100.

Solution:

  1. Multiples: 7,14,,987, 14, \dots, 98. Here a=7a = 7, d=7d = 7, l=98l = 98.
  2. Number of terms: 98=7+(n1)7n=1498 = 7 + (n-1)7 \Rightarrow n = 14.
  3. S14=142(7+98)=7×105=735S_{14} = \dfrac{14}{2}(7 + 98) = 7 \times 105 = 735.

Final Answer: 735.

Takeaway: First find nn, then apply Sn=n2(a+l)S_n = \dfrac{n}{2}(a + l).