Fibonacci Sequence Calculator
Fibonacci Sequence Generator
Calculate nth Fibonacci number, generate sequences, find golden ratio, and explore Fibonacci properties with step-by-step solutions.
Fibonacci Result
55
Golden Ratio (φ) Approximation
Accuracy: 99.96% (F(11)/F(10) = 89/55)
The ratio of consecutive Fibonacci numbers approaches φ = (1+√5)/2 ≈ 1.6180339887
Recurrence Relation:
F(10) = F(9) + F(8) = 34 + 21 = 55
Step-by-Step Calculation:
Fibonacci Properties:
Fibonacci Sequence:
Fibonacci Spiral Visualization:
The Fibonacci sequence appears in nature, art, and mathematics.
What is the Fibonacci Sequence?
The Fibonacci sequence is an infinite series of numbers where each term is the sum of the two preceding ones, starting from 0 and 1. Named after Leonardo Fibonacci who introduced it to Western mathematics, this sequence appears throughout nature, art, architecture, and computer science.
Fibonacci Sequence Formula
Recurrence Relation
With F(0) = 0, F(1) = 1
Most common definition
Binet's Formula
Closed-form expression
φ = (1+√5)/2, ψ = (1-√5)/2
Matrix Form
Matrix exponentiation
Efficient computation
Golden Ratio
Approximation
Accuracy increases with n
Fibonacci Sequence Properties
1. Mathematical Properties
- Recurrence Relation: F(n) = F(n-1) + F(n-2)
- Cassini's Identity: F(n+1)F(n-1) - F(n)² = (-1)ⁿ
- GCD Property: gcd(F(m), F(n)) = F(gcd(m, n))
- Summation Formulas: Σ F(k) = F(n+2) - 1
- Golden Ratio Limit: lim(F(n+1)/F(n)) = φ ≈ 1.618034
2. Computational Properties
- Exponential Growth: F(n) ≈ φⁿ/√5 (grows exponentially)
- Time Complexity: Naive recursion O(2ⁿ), DP O(n)
- Matrix Exponentiation: Can compute in O(log n) time
- Memory Efficient: Can compute with O(1) space
3. Special Properties
- Every 3rd Fibonacci number is even
- Every 4th Fibonacci number is divisible by 3
- Zeckendorf's Theorem: Every positive integer can be uniquely represented as a sum of non-consecutive Fibonacci numbers
- Fibonacci Primes: Fibonacci numbers that are prime (2, 3, 5, 13, 89, 233, ...)
First 20 Fibonacci Numbers
| n | F(n) | n | F(n) | Ratio F(n+1)/F(n) |
|---|---|---|---|---|
| 0 | 0 | 10 | 55 | 1.6181818... |
| 1 | 1 | 11 | 89 | 1.6176471... |
| 2 | 1 | 12 | 144 | 1.6180556... |
| 3 | 2 | 13 | 233 | 1.6180258... |
| 4 | 3 | 14 | 377 | 1.6180371... |
| 5 | 5 | 15 | 610 | 1.6180328... |
| 6 | 8 | 16 | 987 | 1.6180344... |
| 7 | 13 | 17 | 1597 | 1.6180338... |
| 8 | 21 | 18 | 2584 | 1.6180340... |
| 9 | 34 | 19 | 4181 | 1.6180340... |
Applications of Fibonacci Sequence
Nature & Biology
- Phyllotaxis: Arrangement of leaves, petals, and seeds (sunflower seeds, pine cones)
- Biological Growth: Population growth of rabbits (Fibonacci's original problem)
- Anatomy: Proportions in human body (finger bones, ear shape)
- DNA Structure: Fibonacci numbers in DNA sequences and protein structures
Art & Architecture
- Golden Ratio: Fibonacci ratios in classical architecture (Parthenon)
- Art Composition: Fibonacci spiral used in Renaissance art (Da Vinci)
- Musical Scales: Fibonacci numbers in musical compositions and instrument design
- Photography: Rule of thirds based on golden ratio
Computer Science & Technology
- Fibonacci Heap: Data structure for priority queues
- Algorithm Analysis: Example in recursion and dynamic programming
- Cryptography: Fibonacci-based random number generators
- Search Algorithms: Fibonacci search technique
- Coding Theory: Fibonacci coding for data compression
Finance & Trading
- Technical Analysis: Fibonacci retracement levels in stock trading (23.6%, 38.2%, 61.8%)
- Market Cycles: Fibonacci time zones for predicting market turns
- Risk Management: Fibonacci-based position sizing
How to Calculate Fibonacci Numbers
Method 1: Iterative Approach (Most Efficient)
- Start with a = 0, b = 1
- For i from 2 to n:
- c = a + b
- a = b
- b = c
- Result is b (for n ≥ 1)
- Time Complexity: O(n), Space Complexity: O(1)
Method 2: Binet's Formula (Closed Form)
- Calculate golden ratio φ = (1 + √5)/2 ≈ 1.6180339887
- Calculate ψ = (1 - √5)/2 ≈ -0.6180339887
- Compute F(n) = (φⁿ - ψⁿ)/√5
- Round to nearest integer for exact value
- Works well for large n
Method 3: Matrix Exponentiation (Fast)
- Represent as matrix: [1 1; 1 0]
- Compute matrix power using exponentiation by squaring
- Result is top-left element of matrix^n
- Time Complexity: O(log n)
Related Calculators
Frequently Asked Questions (FAQs)
Q: Why does the Fibonacci sequence start with 0 and 1?
A: The modern convention starts with F(0)=0, F(1)=1 to maintain mathematical consistency with recurrence relations and Binet's formula. Some older definitions start with 1, 1.
Q: What is the largest Fibonacci number this calculator can compute?
A: This calculator can compute up to F(1000) using Binet's formula approximation. Exact values are limited by JavaScript's number precision (up to F(78) exactly).
Q: What is the relationship between Fibonacci numbers and the golden ratio?
A: As n increases, the ratio F(n+1)/F(n) approaches the golden ratio φ ≈ 1.6180339887. This is one of the most famous mathematical convergence properties.
Q: Are Fibonacci numbers only found in nature?
A: No! Fibonacci numbers appear in computer algorithms, financial markets, art composition, music theory, and many other fields beyond natural patterns.
Explore the fascinating world of Fibonacci numbers with Toolivaa's free Fibonacci Calculator, and discover more mathematical tools in our Math Calculators collection.