Hey everyone. So in previous videos, we saw how to use the general formula to figure out the terms of a sequence. For example, if I had something like an=2n, then the whole idea was I can grab these indexes, 1, 2, 3, 4, 5. I plug them into this equation here to get my outputs. What we saw is that the first five terms of the sequence were 2, 4, 6, 8, 10. What I'm gonna show you in this video is that sometimes you may be asked to use or write a different kind of formula called a recursive formula. I'm gonna show you the difference between general and recursive formulas, and, basically, what it is is that recursive formulas tell you how to find terms, your an terms, but not based on n that you plug into the equation, but it's actually based on the previous terms, the terms that go before in the sequence. I'm gonna break down the difference, and we'll do some examples together.
Let's get started. So like general formulas, recursive formulas also tell you how to calculate terms of a sequence. We had something like an=2n. You plug these values in and you get your numbers that way. But now let's look at a different type of formula. This formula says an=an-1+2. What this really is, is it's basically just the previous term in the sequence. It's the index n subtracted by 1, so it's the previous term. So, let's take a look here. Let's say you have this formula, an-1+2, and you have the first term in the sequence, which is a1. Let's calculate the next few terms of the sequence using this formula.
Alright. So if I wanted to calculate a2, what this formula tells me is I'm going to have to use the previous term in the sequence, a1, and I'm just gonna have to add 2 to it. Alright? And so what this a1 is, it's just 2, so 2+2 equals 4. Now let's calculate the next term, this a3. What this formula says is that to calculate a3, I need a2, and I have to add 2 to it. We actually just calculated what 2 is, that's just the 4 that we just calculated. So, I'm gonna have to take 4, add 2 to it, and now I get 6. So now I have 4 and 6. If I wanted to calculate a4, you'll see the pattern here. I have to know what a3 is and so on and so forth. So you're just gonna get 6 plus 2, and you're just gonna get 8. So if we continue on this pattern, what you're gonna see is that we get 4, 2, 4, 6, 8, 10.
And notice how we have actually ended up with the same exact numbers that we did when we used the general formula, but we just used a totally different formula to get there. So the basic difference between general and recursive formulas is that for the general formula, you're gonna need n to plug into this equation to get the nth term. You need to know what n is. And for a recursive formula, you just need the previous term in the sequence, this an-1, to get what the next term is. That's the main difference. Now, I want to point out that you might be thinking, well, isn't the general formula always going to be better? And not necessarily. Sometimes you may be asked to just find the next few terms of a sequence, and finding the general formula, if you're not given it, might be really hard. So it's just easier to sort of tell what the pattern is between these numbers. Hey. Look at these. All these are just increasing by 2, so I'm just gonna continue on that pattern.
So it's not that one is always better than the other. It just depends on what you're given. Let's go ahead and take a look at some examples here and work this one out together. Alright? So given this recursive formula and the first term of each sequence, I want to find the next three terms in the sequence. Alright? So I'm told here that in example a, an=2×an-1+3, and I'm already told what a1 is, that's just equal to 1. Let's use this formula to now find the 2nd term. The 2nd term says, or this formula says, in order to find a2, I'm gonna have to take 2, multiply it by the previous number in the sequence, which is a1, and then I'm gonna have to add 3. But notice that we've already calculated that. It's just 2 sorry. a1 is 1. This is gonna be 2 times 1 plus 3. If you work this out, what you're gonna get is 5. So the second term of the sequence is 5. Now let's take a look at the third one. This a3 says, in order to calculate the next term,