Homeโ€บ Math & Scienceโ€บ Fibonacci Sequence Generator

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).