Generate the Fibonacci sequence up to 1,000 terms with a single click. Visualize growth on an interactive chart, compute the golden ratio, sum of terms, parity distribution, and more.
The Fibonacci sequence is one of the most celebrated number patterns in mathematics. Defined by the recurrence F(0) = 0, F(1) = 1 and F(n) = F(n−1) + F(n−2) for n ≥ 2, it appears in countless natural phenomena — from the arrangement of sunflower seeds and pinecone spirals to the branching of trees and the proportions of the human hand. Its connection to the golden ratio φ ≈ 1.6180339887 has fascinated mathematicians, artists, and architects for millennia.
F(n) = F(n−1) + F(n−2), with F(0)=0, F(1)=1
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …
The sequence was introduced to the Western world by Leonardo of Pisa (Fibonacci) in his 1202 book Liber Abaci, though it had been described earlier by Indian mathematicians. The recurrence relation produces numbers that grow exponentially, with the closed-form expression given by Binet's formula:
F(n) = (φn − ψn) / √5
where φ = (1 + √5)/2 (the golden ratio) and ψ = (1 − √5)/2. This formula, derived by Jacques Philippe Marie Binet in 1843, demonstrates that Fibonacci numbers can be computed in O(log n) time using exponentiation — far more efficient than the naive recursive approach.
The sequence is also intimately linked to the Lucas numbers (L(0)=2, L(1)=1), which follow the same recurrence but with different initial values. Many identities connect the two sequences, such as L(n) = F(n−1) + F(n+1).
Phyllotaxis — the arrangement of leaves, seeds, and petals — often follows Fibonacci numbers. Sunflower seed spirals, pinecone scales, and the branching of trees exhibit counts that are consecutive Fibonacci numbers, optimizing packing and light exposure.
Fibonacci retracement levels (23.6%, 38.2%, 61.8%, 78.6%) are derived from ratios of Fibonacci numbers and are used by traders to identify potential support and resistance levels in stock prices and forex markets.
The golden ratio, closely tied to Fibonacci numbers, appears in the Parthenon, the Pyramids of Giza, and works by Leonardo da Vinci and Salvador Dalí. The Fibonacci spiral is a design element in logos, typography, and photography composition.
Fibonacci heaps, Fibonacci search, and Fibonacci coding are used in algorithms for priority queues, optimization, and data compression. The sequence is a classic example for teaching recursion, dynamic programming, and matrix exponentiation.
The following table shows results generated by this tool, verified against known mathematical values.
| Initial values | Terms generated | Last term | Sum | Ratio F(10)/F(9) | Golden ratio φ |
|---|---|---|---|---|---|
| F(0)=0, F(1)=1 | 20 | 4181 | 10945 | 1.618181818 | 1.618033989 |
| F(0)=2, F(1)=1 (Lucas) | 15 | 1364 | 3570 | 1.618055556 | 1.618033989 |
| F(0)=0, F(1)=1 | 50 | 12586269025 | 32951280098 | 1.618033989 | 1.618033989 |
| F(0)=3, F(1)=5 | 12 | 377 | 986 | 1.618055556 | 1.618033989 |