Fibonacci Number Generator
Generate the Fibonacci sequence, jump straight to any term F(n) up to n = 100,000, or check whether any number belongs to the sequence at all — with exact BigInt precision throughout.
0
1
1
2
3
5
8
13
21
34
55
89
144
233
377
610
⚡ Quick Tips for Using This Generator Well
Features
Up to 500 terms with running sum (via the F(n+2)−1 identity) and live golden-ratio tracking.
Jumps directly to any term in about log₂(n) steps instead of counting up one at a time.
Enter any number and find out instantly whether — and where — it appears in the sequence.
Automatically flags sequence terms that are themselves prime numbers.
See F(n−1) and F(n+1) alongside any looked-up term for immediate context.
Every digit of every term is exact — no floating-point rounding at any size.
Why Fast Doubling Changes What's Actually Possible Here
Most free Fibonacci generators compute terms the obvious way — start from F(0) and F(1), then add the previous two terms repeatedly until reaching the target index. That's simple and exact, but it means finding F(100,000) requires 100,000 additions in sequence, each one working with a slightly larger number than the last. Fast doubling takes a fundamentally different route: using the identities F(2k) = F(k)×[2F(k+1)−F(k)] and F(2k+1) = F(k)² + F(k+1)², it can jump straight to a target index in roughly log₂(n) steps by repeatedly doubling, which for n = 100,000 is only about 17 steps rather than 100,000.
The practical difference is dramatic: this tool returns F(100,000) — a number with nearly 21,000 digits — in a fraction of a second, an index far beyond what a one-term-at-a-time generator can reach without a noticeable delay. Most competing tools cap the nth-term lookup somewhere between 1,000 and 10,000 for exactly this reason; fast doubling is what makes pushing that ceiling to 100,000 practical rather than just theoretically possible.
The Reverse Question Almost Nobody Else Answers
Every Fibonacci tool generates sequences and looks up specific terms, but far fewer answer the reverse question: given some number, does it belong to the Fibonacci sequence at all? The test is a clean mathematical shortcut — a positive integer n is Fibonacci precisely when 5n²+4 or 5n²−4 works out to a perfect square. It requires no searching through the sequence at all, just one calculation and a square root check, and it works instantly regardless of how large the number is.
A Rabbit-Breeding Puzzle From 1202 That Never Stopped Showing Up
Leonardo of Pisa introduced the sequence in his 1202 book Liber Abaci, framed as a puzzle: starting with one pair of rabbits, and assuming every pair produces a new pair every month from their second month onward, how many pairs exist after a year? The answer traces out exactly this sequence — 1, 1, 2, 3, 5, 8, 13, 21, and so on. What makes it more than a historical curiosity is how often the same numbers resurface somewhere completely unrelated to rabbits: the spiral seed count in a sunflower head, the branching pattern of certain trees, the number of petals on many common flowers. None of those systems know anything about medieval rabbit-breeding puzzles; they arrive at the same numbers because the underlying recurrence — each new quantity built from the sum of the previous two — turns out to be an efficient solution to a wide range of growth and packing problems in nature.
The sequence also has a quiet oddity built into its very first few terms: F(1) and F(2) are both equal to 1, the only repeated value anywhere in the sequence. It's easy to overlook when skimming a list of terms, but it matters the moment a reverse lookup is involved — the number 1 technically corresponds to two different indices at once, which is exactly the kind of edge case a well-built Fibonacci checker needs to handle deliberately rather than by accident, since a careless implementation can just as easily report the wrong one of the two valid indices without ever surfacing an error.
Who Actually Reaches for a Fibonacci Generator
Students checking recursive-sequence homework across generation, direct lookup and the reverse question, not just the first handful of terms most textbook problems ask for. Programmers testing their own Fibonacci implementation against a known-correct reference, particularly around the point where ordinary integer types start losing precision. Puzzle and number-theory enthusiasts exploring Fibonacci primes, divisibility patterns, or how quickly the golden ratio convergence stabilizes. Designers and photographers referencing Fibonacci-based proportions in composition work, where knowing the exact sequence of reference numbers matters more than the underlying algorithm. For checking whether a specific term in the sequence is itself prime beyond the quick highlight shown here, the Prime Number Checker gives the full factorization and nearest-prime context.
Two Things Worth Trying
Confirming Zeckendorf's theorem: every positive integer can be written as a sum of non-consecutive Fibonacci numbers in exactly one way — 100 = 89 + 8 + 3, for instance. Use Is It a Fibonacci? mode to confirm 89, 8 and 3 are each genuinely Fibonacci numbers, then check that no two of them are consecutive terms in the sequence generated alongside them.
Watching the GCD identity hold exactly: the identity GCD(F(m), F(n)) = F(GCD(m, n)) means GCD(F(12), F(8)) should equal F(GCD(12,8)) = F(4) = 3. Look up F(12) = 144 and F(8) = 21 here, then check their GCD directly in the LCM & GCD Calculator — it comes out to exactly 3, confirming the identity rather than just citing it.
Why Browser-Based Beats a Fixed Reference Table
A printed or bookmarked list of "the first 50 Fibonacci numbers" covers exactly that and nothing past it. This tool computes any term on demand — including ones with tens of thousands of digits — and runs the fast doubling algorithm, the reverse-lookup test, and every sequence calculation entirely client-side in JavaScript, with nothing entered ever transmitted to a server. For the golden ratio's exact irrational value used in Binet's formula, the Scientific Calculator computes φⁿ directly for comparison against this generator's exact BigInt results.
Where This Generator Draws the Line
It generates standard Fibonacci sequences, individual terms up to n = 100,000, and reverse lookups for any input size — it doesn't compute generalized Lucas sequences, Fibonacci numbers modulo a custom base (relevant to the Pisano period), or negative-index terms. For general large-integer arithmetic once a Fibonacci value is in hand — adding, multiplying, or comparing it against other numbers — the Scientific Calculator picks up from there.