Fibonacci Sequence Reference

Fibonacci numbers F(1) through F(50) for quick lookup.

Reference table and live calculator for the Fibonacci sequence. List the first N Fibonacci numbers or look up any single F(n) up to index 5000, computed exactly with BigInt arithmetic in your browser. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How is the Fibonacci sequence defined?

Each term is the sum of the two before it: F(n) = F(n-1) + F(n-2). This reference starts the sequence at F(1) = 1 and F(2) = 1, so the list runs 1, 1, 2, 3, 5, 8, 13, and onward.

The Fibonacci sequence is one of the most famous integer sequences in mathematics: every term equals the sum of the two preceding terms. This reference lists the numbers from F(1) onward and lets you jump straight to any single F(n) — computed exactly, with no rounding, directly in your browser.

How it works

The sequence is built from a simple recurrence with two seed values:

F(1) = 1
F(2) = 1
F(n) = F(n-1) + F(n-2)   for n > 2

To produce the list, the tool keeps a running pair of the last two values and adds them to generate the next, repeating up to the count you choose. The single-index lookup runs the same loop up to your chosen n and returns the final term. Because each addition uses BigInt, the values never overflow or lose precision — F(100), for example, is the exact 21-digit integer 354224848179261915075.

Tips and example

  • A 1-indexed list begins 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 — handy for hand-checking code that generates the sequence.
  • The ratio of neighbouring terms approaches the golden ratio φ ≈ 1.618; by F(20) it is already accurate to several decimals.
  • If your project defines F(0) = 0, just remember this tool starts at F(1); shift your index by one to match.

Use the copy button to grab an exact large Fibonacci number for a test fixture or a constant, without re-deriving it by hand.

The golden ratio connection

The ratio of consecutive Fibonacci numbers converges to the golden ratio φ (phi) as n increases. The first few ratios are 1/1 = 1.000, 2/1 = 2.000, 3/2 = 1.500, 5/3 = 1.667, 8/5 = 1.600, 13/8 = 1.625, and by F(20)/F(19) = 6765/4181 ≈ 1.618034. The convergence is fast: by the 20th term the ratio is already accurate to five decimal places. This relationship arises because φ is the positive root of the equation x² = x + 1 — the same recurrence that defines Fibonacci numbers, scaled continuously.

The golden ratio appears in the proportions of pentagons and pentagrams, in the spiral of a nautilus shell, and in the arrangement of seeds in a sunflower head. These are genuine mathematical occurrences, not coincidences: the spiral packing that minimises gaps in a circular arrangement naturally produces Fibonacci-count arms because successive Fibonacci numbers are the best rational approximations to φ.

Where Fibonacci numbers appear in algorithms and computer science

Fibonacci search. A search algorithm analogous to binary search but using Fibonacci numbers to partition the array. It avoids division and works well on uniformly distributed data.

Dynamic programming benchmarks. Computing F(n) recursively without memoization requires O(2^n) calls — a classic example of exponential blowup cured by memoization or iteration. Almost every introductory dynamic programming course uses this as its first example.

Fibonacci heaps. A heap data structure where the amortized cost of decrease-key and delete is O(1) and O(log n) respectively, enabling Dijkstra’s algorithm to run in O(E + V log V). The structure is named for the Fibonacci numbers that bound the degree of nodes.

Zeckendorf’s representation. Every positive integer can be uniquely expressed as a sum of non-consecutive Fibonacci numbers. For example, 100 = 89 + 8 + 3. This is occasionally used in number theory and in some coding schemes.

Test cases for exact arithmetic. Because Fibonacci numbers grow exponentially, they reach the precision limits of 32-bit and 64-bit floats quickly: F(79) = 14472334024676221 is the last value representable exactly as a 64-bit IEEE double. The lookup table here uses BigInt and returns exact values beyond that point, making it useful for generating test inputs for arbitrary-precision arithmetic code.

Quick reference: selected Fibonacci numbers

nF(n)
1055
206,765
30832,040
40102,334,155
5012,586,269,025
788,944,394,323,791,464 (last F(n) ≤ 2⁵³, safe in 64-bit float)
100354,224,848,179,261,915,075