انضم إلى نوستر
2026-02-17 16:00:53 CET

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.