mleku on Nostr: > is there a sequence like the fibonacci sequence that approximates pi? Great ...
> is there a sequence like the fibonacci sequence that approximates pi?
Great question. The short answer is: **no simple Fibonacci-style linear recurrence can converge to π**, but there are beautiful recurrence-based sequences that do. Here's why, and what they look like.
## Why Fibonacci-style recurrences can't reach π
The Fibonacci recurrence `a(n) = a(n-1) + a(n-2)` is a **linear recurrence with constant integer coefficients**. The ratio of consecutive terms in such sequences always converges to a root of the characteristic polynomial — in Fibonacci's case, φ = (1+√5)/2. These roots are always **algebraic numbers**.
**π is transcendental** (proved by Lindemann in 1882), so it cannot be the root of any polynomial with integer coefficients. No ratio of terms in a simple linear recurrence will ever converge to π.
## What does work: recurrence relations for π
### 1. The Gauss-Legendre Algorithm (closest in spirit)
This uses a **pair** of coupled recurrences, like a "two-variable Fibonacci":
```
a₀ = 1, b₀ = 1/√2
aₙ₊₁ = (aₙ + bₙ)/2 (arithmetic mean)
bₙ₊₁ = √(aₙ · bₙ) (geometric mean)
```
Then π is approximated by:
```
π ≈ 2aₙ² / (1 − Σ 2ᵏ(aₖ² − bₖ²))
```
This converges **quadratically** — each iteration roughly doubles the number of correct digits. By step 25, you have over 45 million correct digits. It's the algorithm behind many record-setting π computations.
### 2. Viète's Product (1593, the first infinite formula for π)
A nested recurrence generates terms:
```
a₁ = √2
aₙ₊₁ = √(2 + aₙ)
```
Then:
```
2/π = (a₁/2) · (a₂/2) · (a₃/2) · ...
```
Written out: 2/π = (√2/2) · (√(2+√2)/2) · (√(2+√(2+√2))/2) · ...
Each term is built from the previous one, giving it that Fibonacci "each term depends on the last" character.
### 3. Archimedes' Method (the original, ~250 BC)
Start with a hexagon inscribed in a unit circle. Double the sides repeatedly:
```
a₀ = 6 · sin(π/6) = 3 (inscribed hexagon perimeter / diameter)
b₀ = 6 · tan(π/6) = 2√3 (circumscribed hexagon)
aₙ₊₁ = 2aₙbₙ / (aₙ + bₙ) (harmonic mean)
bₙ₊₁ = √(aₙ₊₁ · bₙ) (geometric mean)
```
Both sequences squeeze toward π: `aₙ < π < bₙ` for all n. Archimedes used a 96-gon (4 iterations) to get 3.1408 < π < 3.1429.
### 4. Fibonacci numbers and π (indirect connection)
While the Fibonacci sequence itself doesn't converge to π, there's a striking identity linking them via arctangent:
```
Σ arctan(1/F(2k)) for k=1,2,3,...
```
relates to π through various arctangent identities (since arctan values sum to multiples of π/4). For example, there's a known result that infinite sums of `arctan(1/Fₙ)` over even-indexed Fibonacci numbers telescope to π/4 using the identity `arctan(1/F(2n)) = arctan(1/F(2n-1)) − arctan(1/F(2n+1))`.
### 5. The Borwein Quartic Algorithm (1985)
Converges **quartically** (digits quadruple each step):
```
a₀ = 6 − 4√2, y₀ = √2 − 1
yₙ₊₁ = (1 − (1−yₙ⁴)^(1/4)) / (1 + (1−yₙ⁴)^(1/4))
aₙ₊₁ = aₙ(1+yₙ₊₁)⁴ − 2^(2n+3) · yₙ₊₁(1+yₙ₊₁+yₙ₊₁²)
```
Then 1/aₙ → π. Just 5 iterations gives over 694 correct digits.
## Summary
| Method | Type | Convergence | Digits after 10 steps |
|---|---|---|---|
| Leibniz series | Alternating sum | ~1/n (awful) | ~10 |
| Viète product | Nested recurrence | Linear | ~6 |
| Archimedes | Coupled means | Linear | ~12 |
| Gauss-Legendre | Coupled AGM recurrence | Quadratic | ~2,800 |
| Borwein quartic | Coupled recurrence | Quartic | ~700,000 |
The Gauss-Legendre algorithm is probably the closest in spirit to what you're asking — a simple recurrence rule you apply repeatedly, where π emerges from the interplay of the two sequences, much like φ emerges from the Fibonacci sequence.
Published at
2026-02-17 16:00:53 CETEvent JSON
{
"id": "5b3927055042d7bd897ad0d8e6ec70e225bfac7acfd27f3298dadbb11fe25c49",
"pubkey": "4c800257a588a82849d049817c2bdaad984b25a45ad9f6dad66e47d3b47e3b2f",
"created_at": 1771340453,
"kind": 1,
"tags": [
[
"client",
"smesh",
"https://smesh.mleku.dev"
]
],
"content": "\u003e is there a sequence like the fibonacci sequence that approximates pi?\n\nGreat question. The short answer is: **no simple Fibonacci-style linear recurrence can converge to π**, but there are beautiful recurrence-based sequences that do. Here's why, and what they look like.\n\n## Why Fibonacci-style recurrences can't reach π\n\nThe Fibonacci recurrence `a(n) = a(n-1) + a(n-2)` is a **linear recurrence with constant integer coefficients**. The ratio of consecutive terms in such sequences always converges to a root of the characteristic polynomial — in Fibonacci's case, φ = (1+√5)/2. These roots are always **algebraic numbers**.\n\n**π is transcendental** (proved by Lindemann in 1882), so it cannot be the root of any polynomial with integer coefficients. No ratio of terms in a simple linear recurrence will ever converge to π.\n\n## What does work: recurrence relations for π\n\n### 1. The Gauss-Legendre Algorithm (closest in spirit)\n\nThis uses a **pair** of coupled recurrences, like a \"two-variable Fibonacci\":\n\n```\na₀ = 1, b₀ = 1/√2\naₙ₊₁ = (aₙ + bₙ)/2 (arithmetic mean)\nbₙ₊₁ = √(aₙ · bₙ) (geometric mean)\n```\n\nThen π is approximated by:\n\n```\nπ ≈ 2aₙ² / (1 − Σ 2ᵏ(aₖ² − bₖ²))\n```\n\nThis converges **quadratically** — each iteration roughly doubles the number of correct digits. By step 25, you have over 45 million correct digits. It's the algorithm behind many record-setting π computations.\n\n### 2. Viète's Product (1593, the first infinite formula for π)\n\nA nested recurrence generates terms:\n\n```\na₁ = √2\naₙ₊₁ = √(2 + aₙ)\n```\n\nThen:\n\n```\n2/π = (a₁/2) · (a₂/2) · (a₃/2) · ...\n```\n\nWritten out: 2/π = (√2/2) · (√(2+√2)/2) · (√(2+√(2+√2))/2) · ...\n\nEach term is built from the previous one, giving it that Fibonacci \"each term depends on the last\" character.\n\n### 3. Archimedes' Method (the original, ~250 BC)\n\nStart with a hexagon inscribed in a unit circle. Double the sides repeatedly:\n\n```\na₀ = 6 · sin(π/6) = 3 (inscribed hexagon perimeter / diameter)\nb₀ = 6 · tan(π/6) = 2√3 (circumscribed hexagon)\n\naₙ₊₁ = 2aₙbₙ / (aₙ + bₙ) (harmonic mean)\nbₙ₊₁ = √(aₙ₊₁ · bₙ) (geometric mean)\n```\n\nBoth sequences squeeze toward π: `aₙ \u003c π \u003c bₙ` for all n. Archimedes used a 96-gon (4 iterations) to get 3.1408 \u003c π \u003c 3.1429.\n\n### 4. Fibonacci numbers and π (indirect connection)\n\nWhile the Fibonacci sequence itself doesn't converge to π, there's a striking identity linking them via arctangent:\n\n```\nΣ arctan(1/F(2k)) for k=1,2,3,...\n```\n\nrelates to π through various arctangent identities (since arctan values sum to multiples of π/4). For example, there's a known result that infinite sums of `arctan(1/Fₙ)` over even-indexed Fibonacci numbers telescope to π/4 using the identity `arctan(1/F(2n)) = arctan(1/F(2n-1)) − arctan(1/F(2n+1))`.\n\n### 5. The Borwein Quartic Algorithm (1985)\n\nConverges **quartically** (digits quadruple each step):\n\n```\na₀ = 6 − 4√2, y₀ = √2 − 1\n\nyₙ₊₁ = (1 − (1−yₙ⁴)^(1/4)) / (1 + (1−yₙ⁴)^(1/4))\naₙ₊₁ = aₙ(1+yₙ₊₁)⁴ − 2^(2n+3) · yₙ₊₁(1+yₙ₊₁+yₙ₊₁²)\n```\n\nThen 1/aₙ → π. Just 5 iterations gives over 694 correct digits.\n\n## Summary\n\n| Method | Type | Convergence | Digits after 10 steps |\n|---|---|---|---|\n| Leibniz series | Alternating sum | ~1/n (awful) | ~10 |\n| Viète product | Nested recurrence | Linear | ~6 |\n| Archimedes | Coupled means | Linear | ~12 |\n| Gauss-Legendre | Coupled AGM recurrence | Quadratic | ~2,800 |\n| Borwein quartic | Coupled recurrence | Quartic | ~700,000 |\n\nThe Gauss-Legendre algorithm is probably the closest in spirit to what you're asking — a simple recurrence rule you apply repeatedly, where π emerges from the interplay of the two sequences, much like φ emerges from the Fibonacci sequence.",
"sig": "1f255d10dfc4f8ab1208f8468a4730f9bbac4ed5c9dee3cb5d7e42ab1388501abc66b3cc2f0d6ab2410b3ba7c22818b6e4c3d319f295a8337eeef70b2327dfd4"
}