Fibonacci Sequence: Definition, Formula & Example

The Fibonacci sequence is a number sequence in which each new term is the sum of the two preceding terms. Using the common starting values 0 and 1, the sequence begins:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, …
Its recurrence formula is:
Fₙ = Fₙ₋₁ + Fₙ₋₂
with initial values:
F₀ = 0
F₁ = 1
For example:
F₂ = F₁ + F₀ = 1 + 0 = 1
F₃ = F₂ + F₁ = 1 + 1 = 2
F₄ = F₃ + F₂ = 2 + 1 = 3
The Fibonacci sequence is one of the most familiar recursive sequences in arithmetic and number theory and appears in mathematics, algorithms, combinatorial identities, and mathematical models.
What Is the Fibonacci Sequence?
The Fibonacci sequence is defined by using earlier terms to generate later ones.
The standard definition is:
F₀ = 0
F₁ = 1
and for:
n ≥ 2
use:
Fₙ = Fₙ₋₁ + Fₙ₋₂
So each term depends on the two terms immediately before it.
Starting with:
0, 1
the next term is:
0 + 1 = 1
Then:
1 + 1 = 2
Then:
1 + 2 = 3
Then:
2 + 3 = 5
and the pattern continues indefinitely.
First Fibonacci Numbers
Using indexing that begins with F₀ = 0:
| n | Fₙ |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 2 | 1 |
| 3 | 2 |
| 4 | 3 |
| 5 | 5 |
| 6 | 8 |
| 7 | 13 |
| 8 | 21 |
| 9 | 34 |
| 10 | 55 |
| 11 | 89 |
| 12 | 144 |
| 13 | 233 |
| 14 | 377 |
| 15 | 610 |
The values become progressively larger because each term combines two positive earlier terms after the initial zero.
Fibonacci Sequence Formula
The central recurrence is:
Fₙ = Fₙ₋₁ + Fₙ₋₂
This is valid for:
n ≥ 2
when:
F₀ = 0
F₁ = 1
For example:
F₈ = F₇ + F₆
From the sequence:
F₇ = 13
F₆ = 8
Therefore:
F₈ = 13 + 8
F₈ = 21
How to Generate the Fibonacci Sequence
Begin with:
0, 1
Add them:
0 + 1 = 1
Now use the last two values:
1 + 1 = 2
Again:
1 + 2 = 3
Then:
2 + 3 = 5
Continue:
3 + 5 = 8
5 + 8 = 13
8 + 13 = 21
The resulting sequence is:
0, 1, 1, 2, 3, 5, 8, 13, 21, …
Only the previous two terms are required to calculate the next term.
Example: Find F₁₀
Using:
F₀ = 0
F₁ = 1
generate the sequence:
F₂ = 1
F₃ = 2
F₄ = 3
F₅ = 5
F₆ = 8
F₇ = 13
F₈ = 21
F₉ = 34
F₁₀ = 55
Therefore:
F₁₀ = 55
Indexing Conventions Matter
Some sources begin the displayed Fibonacci sequence as:
1, 1, 2, 3, 5, 8, …
while others begin:
0, 1, 1, 2, 3, 5, …
Both describe the same recurrence pattern, but term numbers may differ if the indexing convention is not stated.
On this page:
F₀ = 0
F₁ = 1
Therefore:
F₂ = 1
F₁₀ = 55
When solving a problem, always check how the first terms are indexed.
The Recursive Nature of Fibonacci Numbers
The Fibonacci recurrence is:
Fₙ = Fₙ₋₁ + Fₙ₋₂
This means the sequence is defined using its own previous values.
For example:
F₉ = F₈ + F₇
= 21 + 13
= 34
Then:
F₁₀ = F₉ + F₈
= 34 + 21
= 55
The recurrence does not require multiplication by a fixed common ratio, which distinguishes the sequence from a geometric sequence.
Fibonacci vs. Geometric Sequence
Consider the Fibonacci sequence:
1, 1, 2, 3, 5, 8, 13, …
There is no fixed ratio between consecutive terms.
For example:
2 / 1 = 2
3 / 2 = 1.5
5 / 3 ≈ 1.667
8 / 5 = 1.6
By contrast, a geometric sequence has a constant multiplicative ratio.
For example:
2, 6, 18, 54, …
has:
Common ratio = 3
because each term equals the previous term multiplied by 3.
The Fibonacci sequence grows through addition of two preceding values rather than repeated multiplication by one fixed ratio.
Fibonacci vs. Harmonic Sequence
A harmonic sequence is typically related to reciprocals of terms from an arithmetic progression.
For example:
1, 1/2, 1/3, 1/4, …
has a very different structure from:
0, 1, 1, 2, 3, 5, 8, …
The Fibonacci recurrence depends on addition of previous sequence values.
The harmonic structure depends on reciprocal relationships.
Both are sequences, but their generating rules and behavior are distinct.
Fibonacci Numbers and Ratios
Although Fibonacci numbers do not have a constant ratio, ratios of consecutive positive terms approach a limiting value.
Consider:
2 / 1 = 2
3 / 2 = 1.5
5 / 3 ≈ 1.6667
8 / 5 = 1.6
13 / 8 = 1.625
21 / 13 ≈ 1.6154
34 / 21 ≈ 1.6190
55 / 34 ≈ 1.6176
As the index grows, these ratios approach approximately:
1.618033988…
The convergence is not exact at finite indices; it becomes progressively closer as n increases.
Calculating such ratios uses ordinary fraction operations or decimal division.
A Closed-Form Fibonacci Formula
The recurrence is usually the simplest way to generate Fibonacci numbers, but an individual term can also be represented by a closed-form expression.
Define:
φ = (1 + √5) / 2
and:
ψ = (1 – √5) / 2
Then:
Fₙ = (φ^n – ψ^n) / √5
This is often called Binet’s formula.
It produces the Fibonacci numbers directly from n rather than calculating every earlier term first.
The powers in the expression follow the ordinary rules of exponents.
Example Using the Closed Form
For:
n = 5
the formula is:
F₅ = (φ⁵ – ψ⁵) / √5
Numerically, this evaluates to:
F₅ = 5
which agrees with the recurrence:
0, 1, 1, 2, 3, 5
For hand calculations involving small indices, recurrence is usually much simpler. The closed form becomes conceptually valuable because it describes Fₙ directly in terms of n.
Why a Formula With Irrational Numbers Produces Integers
The quantities:
φ = (1 + √5) / 2
and:
ψ = (1 – √5) / 2
contain √5, so they are irrational.
Yet:
(φ^n – ψ^n) / √5
produces an integer for every nonnegative integer n.
The two irrational components combine in a way that exactly yields the Fibonacci number.
When numerical approximations are used instead of exact expressions, tiny floating-point errors can appear, so rounding may be required computationally.
The floor and ceiling functions and ordinary rounding concepts may therefore appear in numerical implementations, although they do not define the Fibonacci sequence itself.
Fibonacci Numbers Grow Rapidly
The early sequence is:
0, 1, 1, 2, 3, 5, 8, 13, 21
Later terms include:
F₂₀ = 6,765
F₃₀ = 832,040
F₄₀ = 102,334,155
F₅₀ = 12,586,269,025
The growth becomes substantial because each new term incorporates the size of both previous terms.
However, it is still structurally different from the growth of factorials.
Fibonacci Numbers vs. Factorials
Factorials follow:
n! = n × (n – 1)!
Fibonacci numbers follow:
Fₙ = Fₙ₋₁ + Fₙ₋₂
Compare early values.
Fibonacci:
1, 1, 2, 3, 5, 8, 13, 21, …
Factorials:
1, 1, 2, 6, 24, 120, 720, 5,040, …
The factorial operation grows much more rapidly because it repeatedly multiplies by increasingly large integers.
The similarity is only that both can be defined recursively.
Fibonacci Addition Identity
Fibonacci numbers satisfy many useful relationships.
One important identity is:
Fₘ₊ₙ = Fₘ₋₁Fₙ + FₘFₙ₊₁
For example, find:
F₇
using:
m = 3
n = 4
Then:
F₇ = F₂F₄ + F₃F₅
Using:
F₂ = 1
F₃ = 2
F₄ = 3
F₅ = 5
we get:
F₇ = 1 × 3 + 2 × 5
= 3 + 10
= 13
which matches the sequence.
Sum of the First Fibonacci Numbers
A useful identity is:
F₀ + F₁ + F₂ + … + Fₙ = Fₙ₊₂ – 1
For example, through F₅:
0 + 1 + 1 + 2 + 3 + 5
= 12
Now:
F₇ = 13
so:
F₇ – 1 = 12
The identity is confirmed.
Sum of Fibonacci Squares
Another identity is:
F₀² + F₁² + F₂² + … + Fₙ² = FₙFₙ₊₁
For example, through F₅:
0² + 1² + 1² + 2² + 3² + 5²
= 0 + 1 + 1 + 4 + 9 + 25
= 40
The right side is:
F₅F₆ = 5 × 8
= 40
Both sides agree.
Cassini’s Identity
Consecutive Fibonacci numbers satisfy:
Fₙ₊₁Fₙ₋₁ – Fₙ² = (-1)^n
For example, take:
n = 5
Then:
F₆F₄ – F₅²
= 8 × 3 – 5²
= 24 – 25
= -1
Since:
(-1)^5 = -1
the identity holds.
This relationship shows how tightly neighboring Fibonacci numbers are connected.
Factors of Fibonacci Numbers
A Fibonacci number is still an integer and can therefore have ordinary factors.
For example:
F₁₂ = 144
Its positive factors include:
1, 2, 3, 4, 6, 8, 9, 12, 16, 18, 24, 36, 48, 72, 144
The recurrence determines the Fibonacci value; factor analysis examines the divisor structure of that value afterward.
Divisibility Patterns in Fibonacci Numbers
Fibonacci numbers contain several regular divisibility patterns.
For example, every third Fibonacci number is even:
F₃ = 2
F₆ = 8
F₉ = 34
F₁₂ = 144
The parity pattern repeats:
odd, odd, even, odd, odd, even, …
Starting from the positive portion of the sequence.
These patterns can be studied with concepts related to divisibility rules, though Fibonacci divisibility has its own deeper sequence structure.
Common Divisors of Fibonacci Numbers
Fibonacci numbers satisfy an important GCD relationship:
GCD(Fₘ, Fₙ) = F_GCD(m,n)
For example:
F₈ = 21
F₁₂ = 144
First:
GCD(8, 12) = 4
Then:
F₄ = 3
Now calculate the numerical greatest common divisor:
GCD(21, 144) = 3
The values agree.
This connects Fibonacci structure with the Euclidean algorithm and greatest-common-divisor concepts.
Fibonacci Numbers and Prime Factorization
Individual Fibonacci terms may be prime or composite.
For example:
F₇ = 13
which is prime.
But:
F₁₀ = 55 = 5 × 11
and:
F₁₂ = 144 = 2⁴ × 3²
The prime factorization of a Fibonacci term is a separate problem from generating the term itself.
Not every Fibonacci number at a prime index is prime, and Fibonacci primality has more structure than the basic recurrence alone reveals.
Fibonacci Sequence in Combinatorics
The Fibonacci sequence appears naturally in certain counting problems.
Suppose a staircase contains n steps and a person can climb either:
1 step at a time
or:
2 steps at a time
Let Wₙ be the number of ways to reach step n.
Any valid route to step n must end with either:
- a 1-step move from step
n - 1, or - a 2-step move from step
n - 2.
Therefore:
Wₙ = Wₙ₋₁ + Wₙ₋₂
This is the Fibonacci recurrence.
Such examples explain why the sequence frequently appears in combinatorics.
Worked Staircase Example
Suppose there are 5 steps and each move can advance either 1 or 2 steps.
Let:
W₁ = 1
W₂ = 2
Then:
W₃ = W₂ + W₁ = 2 + 1 = 3
W₄ = W₃ + W₂ = 3 + 2 = 5
W₅ = W₄ + W₃ = 5 + 3 = 8
Therefore:
There are 8 possible step sequences
for a five-step staircase under these rules.
The Fibonacci-type recurrence appears because every solution must come from one of two previous states.
Fibonacci Numbers in Algorithms
A straightforward recursive program can mirror:
Fₙ = Fₙ₋₁ + Fₙ₋₂
However, naïvely recalculating the same earlier values repeatedly becomes inefficient.
For example, computing F₅ recursively needs F₄ and F₃, but computing F₄ also needs F₃.
That duplication becomes substantial as n grows.
An iterative method stores only the most recent two values and updates them sequentially.
Iterative Fibonacci Calculation
To generate the sequence efficiently, begin with:
a = 0
b = 1
At each step:
next = a + b
Then replace:
a ← b
b ← next
The values progress:
0, 1
then:
1, 1
then:
1, 2
then:
2, 3
then:
3, 5
and so on.
This method requires only a small fixed amount of stored state.
Finding F₂₀ Iteratively
Continue the recurrence until index 20:
F₁₅ = 610
F₁₆ = 987
F₁₇ = 1,597
F₁₈ = 2,584
F₁₉ = 4,181
F₂₀ = 6,765
Check the final recurrence:
F₂₀ = F₁₉ + F₁₈
= 4,181 + 2,584
= 6,765
Therefore:
F₂₀ = 6,765
Fibonacci Numbers and Fractions
Ratios of consecutive Fibonacci numbers can be written as fractions:
Fₙ₊₁ / Fₙ
For example:
F₁₀ / F₉ = 55 / 34
This fraction is already in lowest terms because consecutive Fibonacci numbers are coprime.
Numerically:
55 / 34 ≈ 1.617647
Working with these exact ratios may involve fraction operations before converting to a decimal approximation.
Consecutive Fibonacci Numbers Are Coprime
Take:
F₈ = 21
and:
F₉ = 34
Their common positive factors are only:
1
So:
GCD(21, 34) = 1
This property holds for every pair of consecutive Fibonacci numbers.
One way to understand it is to repeatedly use the recurrence backward in a GCD calculation until the pair reduces to:
1 and 0
Fibonacci Sequence and Floor or Ceiling Functions
Approximate closed-form computations may produce values such as:
54.999999999…
instead of exactly:
55
because of finite numerical precision.
In implementations that use a closed-form approximation, an appropriate rounding method may be applied to recover the intended integer.
The floor and ceiling functions themselves have separate definitions and should not be treated as part of the recurrence:
Fₙ = Fₙ₋₁ + Fₙ₋₂
The recurrence produces exact integer Fibonacci values without rounding.
Fibonacci Sequence and Factorials
Both the Fibonacci sequence and factorials produce famous integer sequences, but their recurrences differ.
Fibonacci:
Fₙ = Fₙ₋₁ + Fₙ₋₂
Factorials:
n! = n × (n – 1)!
For example:
At index 10:
F₁₀ = 55
while:
10! = 3,628,800
The factorial sequence grows far more rapidly.
Fibonacci Sequence and Fraction Simplification
Ratios between Fibonacci numbers sometimes create fractions that can be analyzed using fraction simplification.
For consecutive terms:
Fₙ₊₁ / Fₙ
the fraction is already reduced because consecutive Fibonacci numbers share no positive factor greater than 1.
For nonconsecutive terms, simplification may be possible.
For example:
F₁₂ / F₈ = 144 / 21
Both values are divisible by 3:
144 / 21 = 48 / 7
Fibonacci Sequence and Decimal Arithmetic
When ratios or closed-form expressions are approximated numerically, ordinary decimal arithmetic may be used.
For example:
F₁₁ / F₁₀ = 89 / 55
≈ 1.61818
Later ratios continue to oscillate closer to approximately:
1.61803
The exact Fibonacci terms remain integers even when a ratio is represented approximately as a decimal.
Fibonacci Numbers in Nature: A Necessary Distinction
Fibonacci numbers can appear in mathematical models of branching, packing, and growth, and related counts are sometimes observed in biological structures.
However, not every spiral or natural arrangement follows the Fibonacci sequence exactly.
A mathematical Fibonacci sequence is defined unambiguously by:
Fₙ = Fₙ₋₁ + Fₙ₋₂
A visual resemblance to a spiral or growth pattern does not by itself establish that the underlying measurements form Fibonacci numbers.
The Fibonacci Spiral
A commonly drawn Fibonacci spiral is created approximately by placing squares whose side lengths follow:
1, 1, 2, 3, 5, 8, 13, …
and drawing quarter-circle arcs through those squares.
This produces a spiral-like construction associated with Fibonacci ratios.
The drawing is useful for visualization, but the Fibonacci sequence itself is the integer recurrence, not the geometric spiral.
Common Fibonacci Sequence Mistakes
One common mistake is adding the wrong pair of earlier terms.
To find:
F₉
use:
F₈ + F₇
not:
F₈ + F₆
With:
F₈ = 21
F₇ = 13
we get:
F₉ = 34
Another mistake is mixing indexing conventions. If one source uses:
F₀ = 0
and another labels the first displayed 1 as term 1, term numbers can appear shifted.
Another error is assuming the ratio between consecutive terms is exactly constant. It approaches a limit but changes from pair to pair.
Finally, the Fibonacci sequence should not be treated as a geometric progression. Its defining operation is addition, not multiplication by a fixed ratio.
How to Check a Fibonacci Term
A term can be checked against its two predecessors.
Suppose:
F₁₃ = 233
The previous terms are:
F₁₂ = 144
F₁₁ = 89
Add:
144 + 89 = 233
Therefore the value satisfies the recurrence.
For a list of Fibonacci numbers, checking several consecutive triples is an efficient way to detect an incorrect entry.
Frequently Asked Questions
What is the Fibonacci sequence?
It is a sequence in which each term after the initial values equals the sum of the previous two terms.
Using:
F₀ = 0
F₁ = 1
the sequence begins:
0, 1, 1, 2, 3, 5, 8, 13, 21, …
What is the Fibonacci sequence formula?
The recurrence formula is:
Fₙ = Fₙ₋₁ + Fₙ₋₂
for:
n ≥ 2
with:
F₀ = 0
F₁ = 1
What are the first 10 Fibonacci numbers?
Starting with F₀:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34
If F₁₀ is also included:
F₁₀ = 55
What is F₁₀?
Using F₀ = 0 and F₁ = 1:
F₁₀ = 55
What is F₂₀?
F₂₀ = 6,765
Why are there two 1s at the beginning?
With:
F₀ = 0
F₁ = 1
the recurrence gives:
F₂ = F₁ + F₀ = 1 + 0 = 1
So 1 appears twice.
Is the Fibonacci sequence geometric?
No. A geometric sequence multiplies by a fixed common ratio. Fibonacci numbers are produced by adding the previous two terms.
Do Fibonacci ratios equal 1.618 exactly?
No. Ratios of successive positive Fibonacci numbers approach approximately 1.618033988…, but individual ratios are not generally equal to that value exactly.
Are all Fibonacci numbers prime?
No.
For example:
F₁₀ = 55 = 5 × 11
and:
F₁₂ = 144
are composite.
Are consecutive Fibonacci numbers coprime?
Yes. Consecutive Fibonacci numbers have greatest common divisor 1.
Is there a direct formula for Fₙ?
Yes. A closed form uses:
φ = (1 + √5) / 2
ψ = (1 – √5) / 2
and:
Fₙ = (φ^n – ψ^n) / √5
Where is the Fibonacci sequence used?
It appears in recurrence problems, combinatorial counting, algorithm analysis, number-theory identities, mathematical models, and various geometric constructions.
Final Example
Find the next five terms after:
13, 21
Use the recurrence.
First:
13 + 21 = 34
Then:
21 + 34 = 55
Next:
34 + 55 = 89
Then:
55 + 89 = 144
Finally:
89 + 144 = 233
Therefore, the next five terms are:
34, 55, 89, 144, 233
The defining idea behind the Fibonacci sequence remains the same at every position:
Fₙ = Fₙ₋₁ + Fₙ₋₂
Each term carries forward information from the two terms immediately before it, creating one of mathematics’ best-known recursive sequences.



