>> So welcome back to another screen cast. We're going to look at a certain kind of recursively defined sequence that has lots of interesting properties and is really famous in mathematics called the Fibonacci sequence. Let's begin with a little concept check/review here. So in the last video you learned about recursively defined sequences. A sequence in general is just an infinite list of numbers that's listed in order. And sometimes they have nicely defined formulas and sometimes they don't, to describe the terms. Here's an example of a recursively defined sequence. That's a sequence where every term in the sequence passed a base case is determined by one or perhaps more of the terms that were already defined in the sequence like the amount of drug in the child's bloodstream we saw. This is recursively define. The base case here actually consists of two terms. B- zero is 2, b1 is 5. So although we're starting the numbering at zero and 1, this is still the first two terms of the sequence 2 and 5. Every other term in the sequence is determined by the previous two terms. Bn is defined to be bn minus 1 minus bn. So just for example, if I were calculating b of 10 that would be b of 9 minus b of 8. And that's for all n greater than or equal to 2. So with that in mind, what's the value of b7? See if you can compute that. Pause the video and come back when you are done. So the answer here is going to be f or 5. And let's quickly run through that and see what we have. We already know b zero and b1. We need to know b2 and all the way up through b7. So b2 would be. The subscript there on n is 2. So that would be taking b1 minus b zero. Those are known quantities. Those are our base case. And so I know what they are. That's 5 minus 2, which is 3. B3, just to go through this quickly, would be b2 minus b1. And since I just calculated b2 up here in the previous line, I can put that in. Three minus b1. I'm still in the base case here, though. It would be 3 minus 5, which is negative 2. B4 would be b3, according to my rule here, minus b2. B4 or B3, sorry. I just calculated up here. So that would be negative 2 minus whatever b2 was. That will be 3. So that's minus 5 or negative 5. B5 is b4 minus b3. B4 was just calculated. That's negative 5. And b3 we had already calculated up here. That's negative 2. I'm subtracting it, though. So this gives me negative 3. B6 is b5 minus b4. B5 I just calculated to be negative 3. And b4 was minus 5. So I'm subtracting that. That gives me a plus 2. And finally, I'll do this up here in the blue part. B7, my target here, is b6 minus b5. And I have that data now to compute it. B6 was 2. B5 was minus 3, but I'm subtracting it. So that gives me a5, and that's my answer. Okay, so we can define sequences recursively which actually two terms in the base case like so. Now we're going to introduce a new sequence now that's got a lot of interesting properties. And like I said, it's really famous, that is defined in such a way it's a recursively defined sequence that has two base cases. This is known as the Fibonacci sequence, after the person who discovered it and actually developed this sequence of numbers you're about to see here, in an attempt to solve a problem at the breeding of rabbits, which is kind of an interesting way to have integer sequences show up. And you can read all about that in your textbook. So in the Fibonacci sequence we start with f1. The terms are called f. And f1 is defined to be 1. F2 is also defined to be 1. And f3 and higher are defined to be fn is equal to fn minus 1 plus fn minus 2. Let's list out what those elements are in the Fibonacci sequence that's down here below. So f1 is 1. F2 is 1. F3 is supposedly, according to my rule here, f2 plus f1. So I'm just going to add the previous two terms, 1 plus 1 is 2. F4 would be f3, which is 2, plus f2, which is 1. And that would give me a 3. Okay, so you can see the pattern now. Every term in the Fibonacci sequence except for the first two is defined to be the sum of the previous two. So the next term, f5, is going to be 3 plus 2. F6 would be 5 plus 3. And then there's f7 and so on and so forth. And this, of course, is an infinite sequence, but the pattern remains as we go through. And that is the Fibonacci sequence. The Fibonacci sequence has a lot of really cool and interesting properties that we're going to discover and explore in this section. One of my favorite ones is what happens when you start looking at ratios of Fibonacci numbers. Let's take a look at that for a second. So let's suppose I start dividing Fibonacci numbers, consecutive Fibonacci numbers into each other. Like, say, take f2 divided by f1. Well, we saw f2 is 1 and f1 is 1, and that's equal to 1. That's not so interesting. Let's move. Let's keep going, though. Look at f3 over f2. While f3 was equal to 2, f2 is equal to 1. That's equal to 2. Still not very interesting. F4 over f3. That would be f4 is 3 and f3 is 2. So that would be 1.5. Now bring this up here and let's keep working. F5 divided by f4. Well, let's see. F4 we know is 3, and f5 would be 2 plus 3. That's 5. And so that gives me, well, five-thirds. But I want to put this in a decimal form, just a real short decimal approximation, 1.66667 if you rounded that off. If you keep doing this, something interesting begins to happen. Okay, f6 over f5. That will be 8 over 5. Okay, eight-fifths is 1.6 exactly. As you keep proceeding through this list of ratios here, the number you get begins to converge on something. Okay, this one I'll skip the numbers here. This is 1.625. And if you keep listing out these, recording a new sequence here. In other words, I have here's my first term. Here's second. Here's the third. If I look at where these numbers are going, something interesting kind of happens. Here's the next few, 1.61538. The next one down the line is 1.61905 approximately. The next one is 1.61765 and so on. There appears to be a number being approached here that's around 1.61. If you kept doing this for a long time, you would get something about equal to 1.6180339887 and it keeps going. This number here is very important. That's called the golden ratio. This is an irrational number. It doesn't have a repeating or terminating decimal expansion. And we usually use the letter phi, the Greek letter phi to denote it. Why is this number so interesting? Well, first of all it exists and that's interesting enough. Second of all, if you look at certain patterns in art in architecture and nature interesting things begin to develop. And this picture up here on the upper left, you see the Parthenon, the famous building in Athens. And the front face of the Parthenon can be inscribed in a rectangle as you kind of see along the outline here. But that rectangle can be split up into other rectangles. And if you look at them, the ratio of the sides of these big rectangles, like that big rectangle and the ratio of the size of that rectangle and this rectangle and this rectangle, those are all the golden ratio. If you look at certain spirals in nature, here like this law a rhythmic spiral here, you see the rectangles up here. So the proportions of each of those sides, if you take this side length and divide it into this longer side length and then take this rectangle and divide the long side length by the short side length and then do the same recursively for these little rectangles that are being formed, that ratio will approach the golden ratio. If you look at the sunflower, for example, and the patterns of the seeds. Pick a seed on the outside, like right here, and just sort of follow the spiral in. And what you're seeing there is one of these spirals here. And that's got a ratio, sort of a curvature that approaches the golden ratio. So the golden ratio is a number that appears repeatedly in art and architecture in just naturally occurring phenomena. Nobody's really sure why, but some artists have actually used the golden ratio deliberately to set up their works. So it has this sort of naturally occurring symmetry and beauty to it. So I think that's pretty interesting. And we're going to look in the next video, and your class work as well, at some theorems about properties of the Fibonacci numbers that are also interesting. So stay tuned.