24 Sums of progressions
Sometimes we are much more interested in the sum of a sequence than just in knowing the n-th term.
Can you remember the handshake problem from the very beginning of the book?
Let’s begin by specialising and work our way up a little bit. First let’s reframe the scenario a little, assuming that everyone in the room walks in one by one, shakes hands with everyone else in the room, and then a new person arrives.
When two people are in the room, there is one hand shake (running total: 1). As a third person enters, they need to shake hands with two people (running total: 3). As a fourth person comes in, they must shake hands with three people (running total: 6).
In other words, as each new person enters, they need to shake hands with the total number of people in the room excluding themselves, and these new handshakes need to be added to the total.
So the number of added handshakes each time is an arithmetic progression (0, 1, 2, 3, 4…).
[latex]n[/latex] | 1 | 2 | 3 | 4 | 5 |
Added handshakes | 0 | 1 | 2 | 3 | 4 |
Running total | 0 | 1 | 3 | 6 | 10 |
Those of you with a keen eye will have also figured the pattern. To arrive at the running total of handshakes, you only need to add up together the preceding added handshakes. For example, when 5 people are in the room, this requires a running total of 10 handshakes. This is also the sum of all the added handshakes to this point (0+1+2+3+4=10).
Added handshakes
Let’s try to write this relationship out in mathematical language. We’ll start by defining the variables – these are the same as we used in the last chapter.
- [latex]n[/latex] refers to the total number of people in the room. So if [latex]n=6[/latex], then we have 6 guests.
- [latex]a[/latex] is the total number of handshakes we start with, in this case 0
- [latex]d[/latex] represents the common difference between them. This is the arithmetic progression which grows by 1 for each person who enters the room.
Although it would be a complex way to count, we could model the number of added handshakes using the same formula we used for progressions in the previous chapter: [latex]a+(n-1)d[/latex].
[latex]0+(1-1) \times 1=0[/latex]
[latex]0+(2-1) \times 1=1[/latex]
[latex]0+(3-1) \times 1=2[/latex]
and so on…
We could simplify this further, by removing the parts that won’t affect the end result (that is, the [latex]0+[/latex] and the [latex]\times 1[/latex]). This would leave us with simply [latex]n-1[/latex].
[latex]1-1=0[/latex]
[latex]2-1=1[/latex]
[latex]3-1=2[/latex]
and so on…
Investigating sums
|
Can you work out what the sum of any 3 consecutive numbers will be? Some numbers can be expressed as the sum of a string of consecutive positive numbers. Exactly which numbers have this property? For example, observe that:
Annotate your findings and see if you can come up with a few conjectures about which numbers can be expressed as a sum of consecutive numbers and which can’t (i.e., we already know that 9, 11 and 18 definitely can be, but what about 2?). |
Running total
This is good, but to get to the running total of handshakes we need to go one step further and add all the numbers in the progression together.
For the handshake problem, the sum of 0,1,2,…,19 that leads to the total number of handshakes produces the same result as the following formula.
[latex]Shakes=\frac{n(n-1)}{2}[/latex]
[latex]\frac{1(1-1)}{2}=\frac{0}{2}=0[/latex]
[latex]\frac{2(2-1)}{2}=\frac{2(1)}{2}=1[/latex]
[latex]\frac{3(3-1)}{2}=\frac{3(2)}{2}=3[/latex]
and so on…
We can explain this formula by saying that [latex]n[/latex] people each shake hands with everyone except themselves [latex](n-1)[/latex] and, to avoid double counting, we divide by 2.
Formula for adding the terms of an arithmetic progressing
If we were to write our sum out in terms of [latex]a[/latex] and [latex]d[/latex] we have
[latex]\underbrace{a}_{\textit{1st term}}+\underbrace{a+d}_{\textit{2nd term}}+\underbrace{a+2d}_{\textit{3rd term}}+ \cdots+\underbrace{a+(n-1)d}_{\textit{nth term}}[/latex]
This gives us an ‘a‘ for every one of the n terms (or n x a altogether) and then d will be multiplied by the sequence [latex](1 + 2 + 3 + 4 + … + n-1)[/latex].
Which, as we have actually already established, adds up to [latex]na+d\left(\frac{n(n-1)}{2}\right)[/latex] or [latex]an+\frac{n(n-1)d}{2}[/latex]. We could even express this over a common fraction, which would give us this monster:
[latex]\frac{2an+dn(n-1)}{2}[/latex]
You can see it at work in scratch.
Check your understanding