Generate Fibonacci numbers
First N Fibonacci numbers via BigInt (no overflow). Shows the sum (= F(n+1) − 1) and the running ratio converging to φ.
F(0) = 0, F(1) = 1, F(n) = F(n−1) + F(n−2).
BigInt avoids overflow at any practical N.
Stat: Output size 213 B
F(0) = 0 F(1) = 1 F(2) = 1 F(3) = 2 F(4) = 3 F(5) = 5 F(6) = 8 F(7) = 13 F(8) = 21 F(9) = 34 F(10) = 55 F(11) = 89 F(12) = 144 F(13) = 233 F(14) = 377 F(15) = 610 F(16) = 987 F(17) = 1597 F(18) = 2584 F(19) = 4181
How Fibonacci works
Each term is the sum of the previous two. The ratio of consecutive terms approaches φ (the golden ratio) as n grows.
- 01
Set N
How many terms — 1 to 5000.
Inputs are treated as UTF-8 throughout the pipeline and validated client-side as you type — nothing dispatches until the value is well-formed.
Ninpututf-8client-sidevalidatedN · text20 · setfirst 20 terms
loaded · parsedclient-side - 02
Generate
BigInt arithmetic keeps every digit.
Each toggle re-computes through a memoised hook, so flipping options never resets your input and the UI stays snappy on large inputs.
genoptionslivememoisedtogglesgen · memoisedexact · live0, 1, 1, 2, 3, 5, …
options set · memoisedlive - 03
Check ratio
F(n)/F(n−1) → φ ≈ 1.618…
Randomness — where used — comes from
crypto.getRandomValues, neverMath.random. Heavy work sits inuseMemo.phicomputeinstantlocaldeterministicratio · instantφ · computed1.6180339887…
computed · instantinstant - 04
Copy or download
Whole list as one F(i) = … per line.
Copy writes through
navigator.clipboardand downloads use aBlob— zero network traffic. Same input plus same options always yield the same bytes.exportcopydownloadzero-networkreproducibleok · copiedready · copiedCopied
shipped · ready to shipsuccess
Pro tips for everyday utilities
Reach for crypto.getRandomValues
Cryptographically random for IDs, tokens, salts. Math.random is for animation and games, not security.
Mock data with seeds
Faker-style libraries can be seeded so tests are reproducible. Embed the seed in the fixture file.
Reference cards beat memory
Cheatsheets for Vim, Git, Docker, Linux signals are faster than man pages when you’re mid-flow.
Browser APIs vary
Touch events, gamepads, and clipboard differ across vendors. Feature-detect before use.
Persist in the right place
localStorage for user preferences, sessionStorage for transient state, IndexedDB for structured data.
When to look up Fibonacci
Algorithm interviews, demos, education.
Interview prep
Verify your DP or recursive solution against truth. Random values come from crypto.getRandomValues — cryptographically secure for tokens, salts, and session IDs. Math.random is deterministic enough for animations but predictable enough to be a security bug.
CSPRNG-backedVisualization
Plot growth on a chart for talks. Pair with hashids, ULID, or UUID v7 when you need both random and sortable — useful for primary keys, public-facing IDs, and event log ordering without a sequence column.
reproducibleNumber theory
Modular Fibonacci and Pisano periods. Output is deterministic given the same seed, so fixtures and tests stay reproducible across CI runs and contributor machines. Embed the seed in the fixture file for full replay.
snappyTest fixtures
Predictable BigInt values for unit tests. Heavy work runs through useMemo so the UI stays snappy on large inputs. Same input + same options yields identical bytes — the kind of stability snapshot tests rely on.
feature-detectedGolden ratio demos
Show φ convergence interactively. Storage tools persist to the right backend: localStorage for user preferences, sessionStorage for transient state, IndexedDB for structured data. Pick the right shelf and quota worries disappear.
deterministicSpirals
Use successive ratios for design grids. Browser feature detection: clipboard, fullscreen, gamepad, and Web Bluetooth APIs gracefully fall back when unavailable. No surprise white screens on Safari or older Firefox.
production-readyFrequently asked questions
Something missing?
Tell us what you need. We ship the top requests every two weeks.