Skip to content

the sum sign, one term at a time

foundations

the puzzle

An empty jar gets 3 cents on day 1, 6 cents on day 2, 9 cents on day 3, and so on, 3 more each day. How many cents are in it after day 6, and how can that be written in one short line?

a worked example

Day 1 adds 3×13 \times 1 cents and day 2 adds 3×23 \times 2, so day kk adds 3k3k. A loop does one step again and again. A counter, here kk, counts the times: 1, 2, 3. Each time round is a pass.

  1. In one line it is ∑k=163k\sum_{k=1}^{6} 3k. The sign ∑\sum is sigma, the Greek letter that matches our S, and it means add up.
  2. The table runs it, one row a pass. The total starts at 0. Under ∑\sum, k=1k = 1 is where the counter starts. On top, 6 is its last value.
  3. Each pass adds the term beside ∑\sum, 3k3k. That is 3 on pass 1, then 6, then 9.
  4. Written out, 3+6+9+12+15+18=633 + 6 + 9 + 12 + 15 + 18 = 63 cents, the table's last total.
  5. In general, with any number nn on top, ∑k=1nak\sum_{k=1}^{n} a_k is a1+a2+⋯+ana_1 + a_2 + \cdots + a_n, with the dots standing for the terms between. For the jar, ak=3ka_k = 3k, so a1=3a_1 = 3, a2=6a_2 = 6, and a6=18a_6 = 18.
total beforecounter kkterm 3k3ktotal after
0133
3269
93918
1841230
3051545
4561863
One row per pass. Each total after becomes the next row's total before, ending at 63.

how it works

Every term of the jar holds a 3, as ∑k=163k=3×1+3×2+⋯+3×6\sum_{k=1}^{6} 3k = 3 \times 1 + 3 \times 2 + \cdots + 3 \times 6. Take the 3 out, as in lesson 2.3, to get 3(1+2+⋯+6)3(1 + 2 + \cdots + 6).

counter kkterm 3k3kwritten as
133×13 \times 1
263×23 \times 2
393×33 \times 3
4123×43 \times 4
5153×53 \times 5
6183×63 \times 6
total633×213 \times 21
Every term is 3 times the counter, so the total is 3 times the counters' total, 21.

1+2+3+4+5+6=211 + 2 + 3 + 4 + 5 + 6 = 21, so the jar holds 3×21=633 \times 21 = 63 cents, as the loop found.

In symbols, ∑k=163k=3∑k=16k\sum_{k=1}^{6} 3k = 3 \sum_{k=1}^{6} k. A number in every term comes out in front of the sum.

in symbols

A term of two parts splits into two sums: ∑k=13(k+4)=∑k=13k+∑k=134\sum_{k=1}^{3} (k + 4) = \sum_{k=1}^{3} k + \sum_{k=1}^{3} 4. In the table, that is (1+2+3)+(4+4+4)=6+12=18(1 + 2 + 3) + (4 + 4 + 4) = 6 + 12 = 18.

The second sum's term has no kk in it, so the 4 is added on each of the 3 passes: 4×3=124 \times 3 = 12.

With nn on top there are nn passes, so for any number cc, ∑k=1nc=c×n\sum_{k=1}^{n} c = c \times n. Seven passes adding 2 make ∑k=172=2×7=14\sum_{k=1}^{7} 2 = 2 \times 7 = 14.

counter kkfirst part kksecond part 4term k+4k + 4
1145
2246
3347
total61218
Each column adds up on its own. The two part totals, 6 and 12, make the term total, 18.

your turn

Work each one out. Where there is a box, type your answer and check it. Each exercise's worked answer opens under it.

exercise 1

A loop runs its counter kk from 1 to 8, and each pass adds 3 to a total that starts at 0.

Each column of 3 squares is one pass.

A number, like 13, 9.5 or 19/2.

worked answer
  1. The loop is ∑k=183\sum_{k=1}^{8} 3, a term with no kk in it.
  2. Eight passes each add 3, so the total is 3×8=243 \times 8 = 24.

Check it another way: The picture has 3 rows of 8 squares, 24 in all.

exercise 2

In some code, a loop is given a stop number and stops just before it. This loop's counter starts at 1 with stop number 9, so 9 itself is left out. Each pass adds 4k4k to a total that starts at 0.

The sum this loop works out:

A number, like 13, 9.5 or 19/2.

worked answer
  1. The counter takes 1 to 8, so the loop works out ∑k=184k\sum_{k=1}^{8} 4k.
  2. Take out the 4. ∑k=184k=4(1+2+⋯+8)\sum_{k=1}^{8} 4k = 4(1 + 2 + \cdots + 8).
  3. 1+2+3+4+5+6+7+8=361 + 2 + 3 + 4 + 5 + 6 + 7 + 8 = 36, so the total is 4×36=1444 \times 36 = 144.

Check it another way: The running totals go 4, 12, 24, 40, 60, 84, 112, 144.

exercise 3

Write out ∑k=15(20−3k)\sum_{k=1}^{5} (20 - 3k).

A number, like 13, 9.5 or 19/2.

A number, like 13, 9.5 or 19/2.

A number, like 13, 9.5 or 19/2.

worked answer
  1. The counter takes 1, 2, 3, 4 and 5, so there are 5 terms.
  2. Written out, 17+14+11+8+5=5517 + 14 + 11 + 8 + 5 = 55.

Check it another way: Split it, the minus staying between the sums, ∑k=1520−∑k=153k\sum_{k=1}^{5} 20 - \sum_{k=1}^{5} 3k. That is 20×5−3(1+2+3+4+5)=100−3×15=5520 \times 5 - 3(1 + 2 + 3 + 4 + 5) = 100 - 3 \times 15 = 55.

exercise 4

Find ∑k=14(k3+5)\sum_{k=1}^{4} (k^3 + 5).

A number, like 13, 9.5 or 19/2.

worked answer
  1. Split it. ∑k=14(k3+5)=∑k=14k3+∑k=145\sum_{k=1}^{4} (k^3 + 5) = \sum_{k=1}^{4} k^3 + \sum_{k=1}^{4} 5.
  2. 1+8+27+64=1001 + 8 + 27 + 64 = 100, and ∑k=145=5×4=20\sum_{k=1}^{4} 5 = 5 \times 4 = 20. So the total is 100+20=120100 + 20 = 120.

Check it another way: Written out, 6+13+32+69=1206 + 13 + 32 + 69 = 120.