The Fibonacci Sequence
Introduction to Fibonacci Sequence
A Simple Pattern
Some number sequences are complex. The Fibonacci sequence is not. It's a list of numbers that follows a straightforward rule: add the last two numbers to get the next one.
Each number in the sequence is the sum of the two preceding numbers, creating a pattern that grows infinitely.
The sequence starts with 0 and 1. From there, the pattern takes over.
0 + 1 = 1 1 + 1 = 2 1 + 2 = 3 2 + 3 = 5
And so on. The first few terms look like this: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34...
The Formula
We can express this pattern as a mathematical rule. This kind of rule, which refers to previous terms, is called a recursive formula. Let's use the letter to stand for a Fibonacci number, and to represent its position in the sequence.
Term
noun
A single number or element in a sequence.
To find the -th term, written as , you add the two terms that came before it: the -th term and the -th term. The formula looks like this:
This rule works for any term as long as is 2 or greater. But a recursive formula needs a place to start. Without a starting point, it can't calculate anything. These starting points are called base cases.
The Base Cases
For the Fibonacci sequence, we need to define the first two terms so the formula has something to build on. These are the fixed points that get everything started.
With these two base cases and the recursive formula, you can generate the entire, infinite Fibonacci sequence. Let's try it for :
We already know and , so:
It works. You can continue this process to find any Fibonacci number you want.
Now, let's test your understanding.
What is the next number in this sequence: 0, 1, 1, 2, 3, 5, 8, __?
The rule is an example of what kind of formula?
