Fibonacci Sequence
Generate sequences, find a specific term, or check if a number belongs.
About this tool
Fibonacci Sequence
Fibonacci Sequence generates the sequence to any length, finds the Nth term, and checks whether a number belongs to it.
How to use it
- Set how many terms you want.
- Or ask for a specific term by index.
- Or enter a number to check whether it is a Fibonacci number.
The sequence and the ratio
Each term is the sum of the two before it, starting from 0 and 1: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34. The rule is trivial and the consequences are not.
Divide any term by the one before it and the result converges on the golden ratio, approximately 1.618. The convergence is quick: by the tenth term it is already accurate to three decimal places, which is why the sequence turns up so often in growth patterns and in design proportion.
Worked example
Watching the ratio settle:
- 8 / 51.6
- 21 / 131.6154
- 89 / 551.61818
Result: Closing on 1.6180339..., the golden ratio.
When it helps
- Generating the sequence for a programming exercise.
- Checking whether a number is a Fibonacci number.
- Exploring the golden ratio numerically.
- Teaching recursion, for which this is the standard example.
Common mistakes
- Disagreeing about the starting index. Some definitions start at 0 and some at 1, so the Nth term depends on the convention.
- Computing large terms with naive recursion, which recalculates the same values exponentially many times.
- Overstating the golden ratio's appearance in nature. Some cases are real, many popular examples are not.