Fibonacci Sequence Generator
Generate the first N terms of the Fibonacci sequence, or look up the Nth Fibonacci number directly. Each term is the sum of the previous two.
Inputs
F(0) = 0, F(1) = 1, F(2) = 1, F(3) = 2, ...
Sequence
โ
Nth term (chosen above)
โ
Sum of first N terms
โ
Golden ratio approximation (last รท prev)
โ
About Fibonacci Sequence Generator
Definition
F(0) = 0, F(1) = 1, F(n) = F(nโ1) + F(nโ2) for n โฅ 2. Each term is the sum of the previous two.
Golden ratio
The ratio of consecutive Fibonacci numbers approaches ฯ = (1 + โ5) รท 2 โ 1.6180339887โฆ as n grows. Try setting count = 30 and check the ratio โ it converges quickly.
Where they appear
Plant phyllotaxis (leaf arrangements), spiral growth in shells and galaxies, the structure of pinecones and sunflowers, and many algorithmic puzzles (dynamic programming, recursion).