Fibonacci Generator
Generate Fibonacci sequence up to n terms
Step 1: Enter how many Fibonacci numbers you want to generate (1 to 100).
Step 2: Click Generate to see the sequence, the n-th Fibonacci number, and the sum.
Step 3: Use the sequence for math problems, art proportions, or programming exercises.
What Is the Fibonacci Sequence
The Fibonacci sequence starts with 0 and 1. Each subsequent number is the sum of the two before it: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34... Leonardo Fibonacci described it in 1202, but Indian mathematicians knew it centuries earlier. It shows up everywhere - flower petals, pinecones, hurricanes, and even stock market patterns.
The Golden Ratio Connection
Divide any Fibonacci number by the one before it. As you go higher in the sequence, the ratio approaches 1.618 - the golden ratio (φ). 34/21 = 1.619. 89/55 = 1.618. Artists and architects have used this ratio for centuries because it's aesthetically pleasing. The Parthenon, Mona Lisa, and modern logos all use golden ratio proportions.
Where Fibonacci Appears in Nature
The sequence isn't just math - it's how nature grows efficiently:
- Flower petals: Lilies have 3, buttercups have 5, daisies have 34 or 55
- Pinecones: Spirals count to Fibonacci numbers (8 and 13, or 13 and 21)
- Sunflower seeds: Two sets of spirals - consecutive Fibonacci numbers
- Tree branches: Main trunk, then branches, then sub-branches follow the pattern
- Hurricane spirals: The arms follow logarithmic spirals based on φ
| Position (n) | Fibonacci Number F(n) | Ratio F(n)/F(n-1) |
|---|---|---|
| 0 | 0 | - |
| 1 | 1 | Infinity |
| 2 | 1 | 1.00000 |
| 3 | 2 | 2.00000 |
| 4 | 3 | 1.50000 |
| 5 | 5 | 1.66667 |
| 6 | 8 | 1.60000 |
| 7 | 13 | 1.62500 |
| 8 | 21 | 1.61538 |
| 9 | 34 | 1.61905 |
| 10 | 55 | 1.61765 |
| 11 | 89 | 1.61818 |
| 12 | 144 | 1.61798 |
| 13 | 233 | 1.61806 |
| 14 | 377 | 1.61803 |
| 15 | 610 | 1.61804 |
| 16 | 987 | 1.61803 |
| 17 | 1597 | 1.61803 |
| 18 | 2584 | 1.61803 |
| 19 | 4181 | 1.61803 |
The ratio converges to φ ≈ 1.61803... as n increases. By n=20, it's accurate to 4 decimal places.
Recursive Formula
F(n) = F(n-1) + F(n-2)
Each number equals the sum of the two before it. F(0) = 0, F(1) = 1. This is how the generator works - start with 0 and 1, keep adding.
Closed-Form Formula (Binet's Formula)
F(n) = (φⁿ - ψⁿ) / √5
φ = (1+√5)/2 ≈ 1.618 (golden ratio), ψ = (1-√5)/2 ≈ -0.618. This formula gives F(n) directly without calculating all previous numbers. For large n, F(n) ≈ φⁿ/√5.
Interesting Properties
- The sum of the first n Fibonacci numbers equals F(n+2) - 1
- Every 3rd Fibonacci number is even (2, 8, 34, 144...)
- Every 4th Fibonacci number is divisible by 3
- Every 5th Fibonacci number is divisible by 5
- The GCD of F(m) and F(n) equals F(GCD(m, n))
What is the Fibonacci sequence formula?
F(n) = F(n-1) + F(n-2), with F(0) = 0 and F(1) = 1. Each number is the sum of the two before it. The sequence goes 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...
What is the 10th Fibonacci number?
The 10th Fibonacci number (F(9) if starting from F(0)) is 34. Counting from F(0)=0: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34. If you count from 1 as the first number, the 10th is 55.
Why is the Fibonacci sequence important?
It appears throughout nature, art, and mathematics. The ratio between consecutive Fibonacci numbers approaches the golden ratio (1.618), which describes aesthetically pleasing proportions. It's used in computer algorithms, financial analysis, and biological modeling.
Can Fibonacci numbers be negative?
The standard sequence uses only non-negative integers. However, you can extend Fibonacci backwards using F(n-2) = F(n) - F(n-1). This gives F(-1) = 1, F(-2) = -1, F(-3) = 2, F(-4) = -3... alternating signs.
How do I calculate Fibonacci numbers efficiently?
For small n, use the recursive formula. For large n, use Binet's closed-form formula or matrix exponentiation. The recursive approach is slow for large n because it recalculates the same values repeatedly. Dynamic programming or memoization solves this.
Other Free Tools
Arithmetic Sequence Calculator
Arithmetic Sequence Calculator
Geometric Sequence Calculator
Geometric Sequence Calculator
Pascals Triangle Calculator
Pascal's Triangle Calculator
Factorial Calculator
Factorial Calculator
Combination Calculator
Combination Calculator
Permutation Calculator
Permutation Calculator