We're going to talk about series, and series is all about adding up terms of sequences. Now, back to us humans, most cultures have commutative songs, songs that have a structure that is change using progressive addition resulting on each verse being longer than the previous. Do share such examples with us in the discussion forum. An example of a cumulative song is the British song, The Twelve Days of Christmas. You may have heard it in the middle of shopping for presents. On the first day of Christmas, my true love sent to me, a partridge in pear tree. Let's read the verse. It goes like this, on the second day of Christmas, my true love sent to me two turtle doves and the partridge in a pear tree. On the third day of Christmas, my true love sent to me three French hens, two turtle doves, and the partridge in a pear tree. He carries on like this with more gifts in this pattern until there are 12 drummers drumming on the last one. That's a lot of noise for sure. How many gifts are there all the way to Christmas? So in the quiz, you've written Day 1 you got one gift, Day 2 is one plus two gifts, so there's three gifts, Day 3, one plus two plus three, so there's six gifts on day three, and it goes on like that. So by Day 12, we have one plus two plus three plus four all the way to 12, which is 13 times 6 gifts. So 78 gifts on day 12. So what we want to know the total sum of gifts all the way to Christmas is the addition of that one plus the three plus the six added with 78. The way we write the pattern of presence in one specific day is related to an arithmetic progression. On the n, we have the sum of the first n terms of the arithmetic progression with first tam one and common difference one. So one plus two plus three all the way to n. So we write this using a summation symbol, which is the Greek letter sigma, and it looks like this. Sample, k from one to n of k, we are adding k as k ranges from one to n, that's what that means. The symbol sigma means the sum, and then the k equals 1 means that the index of summation, so the variable of the sequence is k and we start with value one, that we say k equals 1, and the n on top is the last limit, is the last value that we replace k by. So let's look at what happens as I replace n by different bow. So when n is one, we get the sum from one to one of k which is just one. When n is two, I'm adding two terms. I'm adding the term when k is one and when k is two. So one plus two, which is three. When n is three, I write the sum from k equals 1-3 which is one plus two plus three, which is six, and so on. So this is what the summation symbol and the series notation looks like and how we use it. So when n equals 12, I've got the sum from k equals 1-12 of the term k. So as I replaced k by all those values, I get one plus two plus three all the way to plus 12. So that's the extended form this summation, and that totals 78. Now, in total, it turns out that they are 364 precedence in the hall of the 12 days of Christmas song. Actually, I'm here adding the sums, so is another use of sums. But just for us to complete the exercise for Christmas, I translate this as the sum from k equals 1-12 of the total presence on day n. So I'm adding one plus three plus six all the way to plus 78, which I've done the calculations, have you? Is 364. Now, it is along some to do, 12 numbers to add up, plus you have to work out all of these in-between. You and I probably wondering, is there a shortcut to work this out? I mean, if the song went on and on for another few days instead of just 12 in a same fashion, and in terms of wanting to budget for this expense, is there way of working out this result? Yes, there is. You will find out as we go along with this lesson. Now, back to the sequence as we saw in the introduction to this topic, let's rewrite the rice reward as sequences and series. The amount of grains of rice for square of the chessboard, for square n is given by the sequence a_n equals two to the power n minus one, with n ranging from 1-64. The total reward it's the sum of all these terms. So the total reward is the sum of the series. The sum of a_n, now we need to work out what's the first and last value for the index of summation. We want to have one plus two plus four plus eight plus 16 all the way to adding two to the 63, not 64, the 64 squares we start in one. So we write one plus two plus four plus eight plus 16... all the way to the 64, and that is written as the sum from n equals one to 64 of two to the power of n minus one. So this is how we transform this sum into a summation symbol. Now, notice that we could change the limits in the sum and have it written as the sum from n equals 0-63 of two to the power of n. It's just a cosmetic change, they're exactly the same sums but their present is fairly different. All I've done is that because I've got an n minus one in the other series, and I've got the range from 1-64, if instead of a minus one I have n, then I'm starting at zero and ending at 63. So the idea here is that when we add up sequences incrementally, we are creating a new sequence, the sequence of partial sums. But because the sequence is specifically generated by adding a consecutive number of terms of a sequence, we call it series. So that's what a series is, is the sum of consecutive terms of a sequence, and in some cases, we have shortcuts to find this sum. At the start of this topic, we talked about a job offer with two payment plans. We wrote the sequences for those and within the sums in our spreadsheet. Option 1 was we had a 100 pounds in the first day and then 50 pounds extra done the day before in any new day, and option 2 was a pound to start with and then the pay was doubled every day. So we saw option 1 is an arithmetic progression of common difference 50 and 1st term a 100, and option 2 is a geometric progression with first term one and common ratio two. Now, in terms of the arithmetic progression, the general term is a_n is 50 times n plus one. You can work it out from the formerly worked and the sum up today n is the sum from k equals 1-n of 50 times n plus one, which is in expanded form 100 per 150 plus 200 plus all the way to 50 times n plus one. For the geometric progression on payment plan to the general term is b_n equals two to the power n minus one, or just two to the n divided by two. So the sum up today n is the sum from k equals one to n of two to the power of n minus one. So when we look at the spreadsheet which I actually show you, we had results for the sums. So we can actually write that the sum of the 13th day which I calculated and highlighted last time, the sum of k from 1-13 of a_k from our spreadsheet was 5,200, and the sum for the second payment plan from 1-13 was 8,191. So we can say the sum of the first payment plan over 13 days is less than the sum of the second. So that means that we would choose payment plan 2 if we were planning to work for 13 days or more. Now, when we were calculating the presence on a particular day in the Christmas song, we have a special type of number coming up and I really need to talk to you about that. So we had numbers, we had the sum 1 plus 2 plus 3 all the way, if he was day 7 he would be all the way there. This sum which is the sum of a very particular arithmetic progression when the common difference is one, the result of these sums is called a triangular number. What I mean is, if we have number 1, that's the triangular number, number 1 plus 2 being 3 is also triangular number, the 1 plus 2 plus 3 which is 6 is also triangular number, and so on. All the numbers written in this fashion, and that's because that many dots can be arranged in a triangular pattern. So one is just very simple triangle. Three can be written as one and then two underneath, that's a triangular pattern. Six, it's like the one before but with a new row triangles. How beautiful, and it carries on. The next triangle number will have four row. So we have a one with a two, with a three, with a four. So that's 6 plus 4, that's 10. So all of these are triangular numbers and they will come up again and again in your mathematical and computing life. So when we look at the some of the arithmetic series, you will get a formula for triangular numbers. So let's expand the following series. We have the sum from n equals 3-7 of the expression n plus 1 over n. Let's write this in expanded form. That means we're going to replace n by the first value and then carry on until I get to the last value. So when n is 3 I have 3 plus 1 which is 4 over 3, plus when n is 4 I have 4 plus 1 on top so is 5 over 4, when n is 5 I get 6 over 5, when n is 6 I get 7 over 6, when n is 7 which is the last one I get 8 over 7. So this is the expanded form and to find the result you just add up those values, and this equals 6.09285714 recurring. I mean it's going to be a fraction, so it should be either finite or recursive. So this is the value. So let's look at another one. So I've had a sum from k equals 2-5 of k cubed, it's important that the index of summation which in this case is k because that's what's k equals to, is the same as the variable used in the sequence. So I've got k cubed. So I've got 2 cubed plus 3 cubed plus 4 cubed plus 5 cubed and you can work out what that is. Another one, sum from i equals 1-4 of the number 10. Now, i is the index of summation. The number you're adding every time does not change with i, so you are adding 10 to itself as many times as i goes from 1-4. So 10 when i is 1 , 10 when i is 2, 10 when i is 3, 10 when i is 4, 4 times 10 it's 40. So in general, if you have a constant number added between i equals 1-4, i equals 1-20, is that many times the constant number. The sum from n equals 2-6 of 2 to the power of 6 minus n, 6 minus n in the power. When n is 2 I've got 2_4. When n is 3 I got two cubed, when n is 4 I've got two squared, when n is 5 I've got 2_1, and when n is 6 I got 2_0 which is one, and then you can work that out as well. Let's now do the other way around. Let's start with sums and write it with a summation symbol. So if we adding the odd numbers from 1-13, 1 plus 3 plus 5 plus 7 plus 9 plus 11 plus 13. This can be written as sum, and now I need an expression that is going to generate all these odd numbers. Well, we're starting one and then add two every time. So that's an arithmetic progression with first term and a common difference two. It will be- 2n minus 1 will do the trick from n equals 1 and now how many terms; one, two, three, four, five, six, seven. Let's check that when n is 1 we get the first term. When n is 1 we get 2n minus 1 is 2 take away 1 that's 1. When n is 7, we have 2n minus 1 is 2 times 7 which is 14 minus 1 which is 13. So yes, those are correct. I'll put brackets to make sure that the 2n minus 1 is all being added up in the series. So let's now do a half added with a quarter added with eighth and so on, all the way to 1 over 64. So this is a geometric progression with common ratio 0.5 with first-time 0.5. So this will be the sum. Let's have a variable n and we need a half to a set and power. Now, we can simplify things by choosing a value of n that will give us a half on the first instance. So when n is 1, we get a half and then got how many terms? Well, we need to do a half to the power of n equals 1 over 64. So we just need to work out to when 2_n, what n makes 2_n being 64. So 64 we got 2, 4, 8, 16, 32, 64, that's power 6. So 2_6 is 64. So n is 6. Then we are. So we wrote that sum of a geometric series with the summation symbol. Let's do another one with alternating terms as in positive, negative, positive, negative, and so on until we got this one. That looks like a geometric progression, we're doubling every time but not quite, 2 multiplying by negative 2 every time. So we will have minus 2 to some power. Let's put it n and then let's workout what will be the value of n to give us one to start with and then minus 2 next. So if n is 0 minus 2 to the 0, it's 1, so that works. Then when n is 1 minus 2_1 is negative 2, so that's fine. So n equals 0 will give that guy, then n equals 1, and all the way to 64. But we can just count the number so 0, 1, 2, 3, 4, 5, 6 or we could use the same technique we used in the other one to workout the power of 2. Another one. One half plus a third plus one-quarter plus one- fifth plus 1 over 6, that one it's actually called harmonic series. We're having 1 over a number that is increasing, their denominator is increasing. So we have 1 over n and n begins in 2 and ends in 6. Now, be very careful of division by 0. They'll make n equal 0 in that one. One more, say we adding 4 plus 9 plus 16 plus 25 plus 36. Those you'll probably recognize are square numbers, 4 is the square of 2, 9 is the square of 3, 16 is a square 4, 25 is the square of 5, 36 is square of 6. So we're doing squares of numbers and the first square is the square of 2 and the last square is the square of 6. Because the summation symbol has behind it a sum, we can add and subtract and multiply by a constant these sums. So we can do things like if I have the sum of n plus 2_n and my n is ranging from 1-4, because I'm adding the n and the 2_n inside the bracket, I can separate the sums. I can say I can add the ns and I can add the 2_ns, but I need to be careful with the variable. It's from 1-4 and is from 1-4 on both. So basically, what I'm saying is that if I'm adding 1 plus 2 when n is 1 and then 2 plus 2 squared plus 3 plus 2 cubed plus 4 plus 2_4, I can choose to add the 1 with the 2 with the 3 with the 4 in one summation and the 2 squared, 2 cubed 2_4 in another summation. That's why I did one summation for the 1, 2, 3, 4, and another summation for the powers of 2. We can do that and we can also do the subtraction of two summations. We can also do 5 times a sum say we have n plus 2_n, my n could be ranging from 2-4. If I multiply everything by 5, that is the same as saying I have the sum of multiplying the expression inside by 5. So that's saying if I've got 5 times the sum that it's 2 plus 2 squared which is the first one when n is 2 plus 3 plus 2 cubed plus 4 plus 2_4, with these little brackets here, is the same as doing the sum of every single term multiplied by 5, I'm just saying I can do 5,2 plus 2 squared plus 5, 3 plus 2 cubed plus 5 4 plus 2_4. So that's what that means putting the constant inside the summation or outside the summation. Now, what's really important is that when we multiply two sequences inside the summation symbol, that is not the same as multiplying the summations, it is not. So what I'm saying is that if you have n times 2_n and you're doing this sum. This is not the sum of n times the sum of 2_n. It is not the same. The way you can look at that, expand this sum, expand this sum, and then multiply the results together and you will see it is not the same. You may find one or two examples where they are, but in general, they are not. So now, join me in exploring all these concepts in more detail and answers to some of the questions raised in the next videos.