Explore the mathematics of the Fibonacci sequence, its connection to the Golden Ratio (phi), examples in nature, and dynamic programming code.
Calculate your numbers instantly in your browser. Fast, free, no signup.
Introduced to Western mathematics in 1202 by Italian mathematician Leonardo of Pisa (known as Fibonacci), the Fibonacci Sequence is one of the most famous patterns in all of mathematics.
Beyond theoretical math, the sequence governs biological structures, financial market analysis, and computer science interview algorithms.
Starting with 0 and 1, every subsequent term is formed by adding the previous two numbers together:
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377
Generate Custom Sequences: Generate terms up to the 100th Fibonacci number with our Fibonacci Generator.
When squares whose side lengths equal Fibonacci numbers are tiled together, drawing quarter-circles through the corners creates the Golden Spiral:
O(n) Time)function getFibonacci(n: number): bigint[] {
if (n <= 0) return [];
if (n === 1) return [BigInt(0)];
const sequence: bigint[] = [BigInt(0), BigInt(1)];
for (let i = 2; i < n; i++) {
sequence.push(sequence[i - 1] + sequence[i - 2]);
}
return sequence;
}
F(n) = F(n-1) + F(n-2), where starting terms are F(0) = 0 and F(1) = 1. Each subsequent number is the sum of the two preceding numbers.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55.
Dividing any Fibonacci number by its immediate predecessor yields an approximation that converges on the Golden Ratio (phi ≈ 1.6180339887...).
Technical Architect & Lead Developer • ToolsHub Pro
Abdul Nabi is a senior software engineer and technical architect specializing in client-side Web APIs, high-performance browser computing, cryptographic validation, and privacy-first digital utility platforms. All guides on ToolsHub Pro are peer-reviewed for mathematical rigor and developer accuracy.