Imagine you're stranded on a desert island and you really need a good approximation of π for some super machine you're building to make your escape. You can't remember enough decimal places — but you do remember your fractals.
Near the cusp of the Mandelbrot Set at c = 0.25, count how many iterations I of the feedback equation z² + c it takes to escape past 2.0 when you start a tiny distance ε beyond the cusp. As ε shrinks, those iteration counts spell out the digits of π — and √ε × I converges on π directly. It's beautiful, and the least efficient method of computing π you'll ever meet.
Perhaps your machine is AC powered from a tidal source or wind generator and there are phase-angle calculations to make for the flux capacitor to power up. Suffice it to say you really need a good approximation of π for things to work just right — and you can’t remember it to enough decimal places. Given a pencil, some paper and a simple calculator, there just may be a way, if you have a good recollection of the Mandelbrot Set and its properties.
Its calculation is based on the concept of prisoners and escapees — quite relevant to our island scenario. The core of the computation is a feedback equation of the form z² + c. Feeding the result back in from z = 0.0 gives an infinite sequence:
As the sequence progresses, the result either shrinks or grows without bound: the original point is either imprisoned within the set or escapes it. If a number’s iterations stay ≤ 2 it’s in the set; if they exceed 2 it’s out. (The value 2 is an arbitrary boundary that comfortably encompasses the whole set for our purposes.)

The set crosses the x-axis exactly at x = 0.25 — the cusp. Anything ≤ 0.25 is in the set; anything greater escapes. Take c = 0.25 as our starting point and explore values just a little bigger, c + ε, asking how many iterations I(c) it takes for the result to grow past 2.0. With ε = 1.0 (so c = 1.25):
I(0): 0.0² + 1.25
I(1): 1.25² + 1.25
I(2): 1.5625² + 1.25 = 2.8125 [bang — bigger than 2.0]Two iterations. With ε = 0.5 (c = 0.75) it again takes two. With ε = 0.3 (c = 0.55):
I(0): 0.0² + 0.55
I(1): 0.3025² + 0.55 = 0.8525
I(2): 0.8525² + 0.55 = 1.2767
I(3): 1.2767² + 0.55 = 2.1801… [bang]Three iterations. Tabulating ε against the iterations to escape:
| ε | I(c) |
|---|---|
| 1.0 | 2 |
| 0.1 | 8 |
| 0.01 | 30 |
| 0.001 | 97 |
| 0.0001 | 312 |
| 0.00001 | 991 |
| 0.000001 | 3140 |
| 0.0000001 | 9933 |
| 0.00000001 | 31414 |
| 0.000000001 | 99344 |
| 0.0000000001 | 314157 |
| 0.00000000001 | 993457 |
| 0.000000000001 | 3141625 |
As we approach 0.25 with ever-smaller offsets, the iteration count alternately approximates the digit sequence of π. Even with only a rough memory that π starts “3.something”, you can place the decimal point and read off the answer. But there’s something subtler. Add a column of √ε × I(n):
| ε | I(n) | √ε × I(n) |
|---|---|---|
| 1.0 | 2 | 2.000000 |
| 0.1 | 8 | 2.529822 |
| 0.01 | 30 | 3.000000 |
| 0.001 | 97 | 3.067409 |
| 0.0001 | 312 | 3.120000 |
| 0.00001 | 991 | 3.133817 |
| 0.000001 | 3140 | 3.140000 |
| 0.0000001 | 9933 | 3.141090 |
| 0.00000001 | 31414 | 3.141400 |
| 0.000000001 | 99344 | 3.141533 |
| 0.0000000001 | 314157 | 3.141570 |
| 0.00000000001 | 993457 | 3.141587 |
It’s a little like magic: √ε × I(n) is an approximation to π on every row, and it’s closing in — no need even to insert the decimal point yourself.
It’s the most inefficient method of approximating π I’ve ever come across — but it’s certainly something you could do on a desert island while awaiting rescue. A lot of time.
If you have a powerful machine and want to continue the sequence, here’s the Mathematica snippet for counting iterations:
ostart = 0.25;
e = 0.0000000000000001;
c = ostart + e;
iter2[x_] := x^2 + c;
Length[NestWhileList[iter2, c, # <= 2.0 &]]As the iteration count grows, so do floating-point rounding errors, so there’s a machine-dependent limit to how far you can go. There are many other ways to approximate π using the Mandelbrot Set, but this is about the simplest — and it avoids complex numbers entirely, even if the arithmetic is intensive.
Curiosities like this are the same pattern-spotting instinct we bring to operational data — finding the structure hiding inside a stream of numbers. It’s exactly what powers AI in the energy sector and anomaly detection like finding needles in the digital haystack.
From fractals to forecasting, finding the structure inside data is what we do. If you've a complex energy problem worth solving, let's talk.