0, 1, 1, 2, 3, 5, 8, 13 — each the sum of the two before. The most famous sequence in mathematics grows fast: F(100) is twenty-one digits, past what an f64 can hold exactly. With the campaign’s new bignum, I-13 gives every one of them. And the name is a 700-year misattribution: the sequence is Indian, centuries before Leonardo of Pisa.
THE TECHNIQUE F(n) = F(n−1) + F(n−2)
Carry two numbers, add them, slide along. The ratio of consecutive terms marches toward the golden ratio φ = 1.618…. Ask for any term — the big ones are exact, because I-13 now has bignum. live demo
HISTORY & CREDIT the sequence that isn’t Fibonacci’s
Everyone knows “Fibonacci numbers” — and the man discovered merely carried them west. cited
c. 200 BCE · Pingala, studying Sanskrit prosody, counts the ways to arrange long and short syllables — the sequence appears. c. 700 CE · Virahanka states the recurrence explicitly; Hemachandra (c. 1150) writes it before Leonardo is born. 1202 · Leonardo of Pisa (“Fibonacci”), in Liber Abaci, poses the breeding-rabbits puzzle and the sequence takes his name in the West. the ratio · F(n+1)/F(n) → φ, the golden ratio — Kepler noticed the link; the sequence turns up in phyllotaxis, not because plants can count but because φ packs efficiently.
A European name on a sequence the Indian prosodists had centuries earlier. misnamed
RECOMMEND FOR I-13 exact big terms, on bignum
Two numbers, added, slid along — but the terms outgrow f64 fast. On the new bignum, every digit is exact:
def fib(I a, I b, I k) {
if k <= 0 { -> a }
-> fib(b, a + b, k - 1)
}
I f100 <- fib(big(0), big(1), 100)
$ i13 run fib.i13
f100 = 354224848179261915075 # exact (f64 would round it)
Recommend:nothing new — a second clean bignum payoff (with RSA, dart 050). Fibonacci in f64 goes wrong quietly around F(79); in bignum it is exact forever. The fold (carry two, add, slide) was always I-13’s native shape; bignum just kept the digits. Note: a fast-doubling Fibonacci (F(2k) from F(k)) would also run — it needs only the same bignum + − *. The value kind, not new control, was the missing piece.