An instrument · a spiral · the three-gap theorem

Sunflower

Mark the points α, , , … around a circle — one full turn is 1, so only the fractional part counts. However you choose α, and however many points you place, the arcs between neighbours come in at most three distinct lengths, and whenever there are three the longest is exactly the sum of the other two. This is the three-gap theorem, conjectured by Steinhaus and proved by Sós, Świerczkowski and Surányi in 1958. Which three lengths appear is dictated by the continued fraction of α — and the number whose continued fraction is the slowest to converge, the golden ratio, keeps its three gaps the most nearly equal for the longest. That is the leading explanation for why a sunflower sets each seed near 137.5° from the last: it is the one angle no rational can crowd, so seeds placed close to it pack most evenly. The full biological story is more involved — each new seed forms in whatever gap is largest at the time — but packing is the reward the geometry offers.

I · Look at it first

Two seed heads

Both heads below are grown by the same rule — the j-th seed is placed at radius √j and angle 2π, the phyllotaxis model Vogel wrote down in 1979 — and they differ only in the one number α. The left head uses the golden ratio; the right uses whichever α you pick. Every seed is tinted by the length class of the gap it opens on the circle the moment it lands: three colours, never four, so the head is a live readout of the theorem rather than a decoration. Watch where the tints fall — the golden head keeps its three classes finely mixed, and a poorer α segregates them into coarse bands or collapses them onto spokes.

Two live phyllotaxis heads, tinted by gap class liveseeds placed 0 · 0 per head
Golden φ − 1 = 0.6180340 · angle exact
spiral-arm families: —
Your α ·
spiral-arm families: —
small gap d₊medium gap d₋large gap d₊+d₋

The arm-family counts printed under each head are the continued-fraction denominators of α that are ≤ the seed count — the number of spiral arms in each visible family. For the golden angle they are the Fibonacci numbers; for √2 − 1 they are the Pell numbers; for a rational they stop, and the head becomes a finite set of straight spokes. These counts are integer-exact exact. The tints are computed from the seed geometry in double precision, which is faithful for the seed counts here (a drawn head could only fake a fourth colour past n ≈ 10⁷; the exact arithmetic below never uses geometry).

II · The statistic

Never four

Turn the picture into a count. At every n take the arcs between the marks and tally their distinct lengths. The theorem says the tally is never more than three — so a histogram of arc lengths can have at most three spikes, and it stays that way for every n, forever. The running count of distinct lengths, drawn against n, is a sawtooth: it climbs to 3 and drops back — to 2 exactly at each continued-fraction denominator qk, the moments the marks are most evenly spread, and to 1 only when the two remaining gaps are equal. Nothing here is fitted or sampled; the counts are integer-exact.

Arc-length histogram at n = 0 for exactdistinct lengths now: · largest = small + medium
small d₊medium d₋large d₊+d₋

The distinct-gap count against n

Distinct arc lengths for every n up to 0 exactdrops to 2 at qk =
distinct count (1, 2 or 3)continued-fraction denominators q_k

The sawtooth touches 2 at every convergent denominator qk (marked), and for angles with large partial quotients it also touches 2 at the semiconvergents in between; it reaches 3 as soon as a long gap appears and stays there until the next best approximation evens things out again. The heights of the histogram spikes are the multiplicities nj₊, nj₋, j₊+j₋n, which sum to n — those three numbers are printed above the spikes themselves; the exact BigInt check of the identity largest = small + medium is shown below in Section III.

III · The deeper theory

The ladder

The three gap lengths are not arbitrary — they are the continued-fraction convergents of α read off as distances. The convergent pk/qk is the best rational approximation of α with denominator ≤ qk, and the error it leaves, ‖qkα‖ (the distance from qkα to the nearest integer), is exactly one of the gap lengths on the circle. The geometry is the arithmetic. Below, the convergents are computed live and their errors drawn as ticks onto the histogram spikes; they land on them to machine precision.

Continued fraction of and its convergents livegolden convergent rows in gold
kakpkqk‖qkα‖

The errors land on the gaps

Gap lengths at n = 0 with the convergent errors ‖qkα‖ as ticks exact
gap lengths (small · medium · large)‖q_kα‖ for each convergent
convergent errors ‖qkα‖ with q ≤ n that appear as gapstheir denominators q largest gap − (small + medium)exact identity, BigInt exact max |‖qkα‖ − nearest gap|, over those ticksgeometry vs arithmetic, in double precision live

Only the convergent errors ‖qkα‖ whose denominator qk is close to n — the last few convergents with qkn (or, for angles with a partial quotient above 1, their semiconvergents) — are exactly the current gap lengths; the ticks land on the spikes to the floating-point floor (the last number above, ~10⁻¹⁶). For the golden ratio all three spikes carry a tick, because its three gaps are three consecutive convergent errors; for an angle with a partial quotient above 1, like √2 − 1, a generating gap can instead be a semiconvergent (here 169 + 408), so the middle spike need carry no convergent tick — but it is still exactly the sum minus the small gap. The identity largest = small + medium is exact in the kernel's BigInt rationals: the middle number above is exactly zero.

IV · The dial

Sweep the angle

Now move α continuously and watch the head reorganise. At a rational the head collapses to a handful of straight spokes — 1/2 gives two, 1/3 gives three, 2/5 gives five — because the marks repeat after finitely many steps. Between the rationals the head is a spiral, and the more slowly α's continued fraction converges the more even the spiral. The golden ratio is the most even of all; numbers with a large partial quotient, like e − 2 or π − 3, spend long stretches almost rational and betray it as a coarse, streaky head. The lower chart is the star discrepancy D*n — how far the marks are from perfectly uniform — against n, with the golden ratio's curve drawn as the optimum you are trying to reach.

0.6180
golden ratio ·
this αgolden optimum
D*n·n at n = 4000bounded (~log n) only for badly-approximable α live max gap ÷ min gap, n ≤ 4000golden caps at φ² = 2.618 live packing score at 500 seeds1.0 = perfect hexagonal live

Star discrepancy is D*n = 1/2n + maxi|x(i) − (2i−1)/2n| over the sorted fractional parts; D*n·n stays bounded like log n for the golden ratio (and every badly-approximable number) and grows like n for a rational, which is why the rational curves shoot up off the top of the log axis. The golden ratio's global optimality is Hurwitz's 1891 theorem: liminf q‖ = 1/√5 = 0.4472136, the largest such constant of any number, reached along the Fibonacci denominators — in the recorded run at q = 121393 stored, report §4. No number is more uniform; the golden angle is the best one available.

V · The game

Pack the seeds

You are given a dial and 500 seeds, and one job: spread them so that the closest pair is as far apart as possible. The score is that minimum spacing, divided by the spacing a perfect hexagonal packing would give — 1.0 is unreachable, and the machine, which plays the golden angle, sits at the top. Try to beat it. You will find that the golden angle is a knife-edge: a hair to either side and the score falls off a cliff, and any simple fraction is a catastrophe. Only noble numbers — those whose continued fraction ends in all 1s — come close, because they are the ones the rationals can never quite catch.

Your head at 500 seeds liveMove the dial; lock in your best.
0.50φ 0.6180.700.85
0.6600
Machine (golden)
You now
Your best
Move the dial. Your score is the min spacing over the golden optimum.
Best ratio to golden Locks 0

Round two — find the golden one

Four heads, one grown at the golden angle and three at near-misses or other noble numbers. Which is the golden ratio? (The most even one, with no coarse streaks.)

Provenance

What is exact, what is measured

Live, exact, stored

The three-gap counts, the multiplicities, the continued-fraction denominators and the identity largest = small + medium are theorems, integer-exact, and are computed here in exact BigInt arithmetic with no error bars. The seed geometry, packing scores and discrepancies are measured live in your browser from that geometry. A few numbers that need n in the millions — the golden gaps at n = 10⁶, the Hurwitz constant along the Fibonacci denominators, the 10,000-angle packing grid — are quoted from the kernel's recorded run and tagged stored.

Enumerate every n up to 4000 for the current α and check the theorem holds: at most three distinct gaps, largest = small + medium exactly.
Not run yet.

The numbers from the recorded run

QuantityStatusValue / evidence
Three-gap theorem: ≤ 3 distinct arc lengths, all nexactproved Sós 1958, Świerczkowski 1958, Surányi 1958; kernel checked 2000 α × all n ≤ 2000 (4·10⁶ points), max distinct = 3, 0 violations
largest gap = small + mediumexactautomatic from j₊+j₋ ≥ n; verified in exact BigInt for the named constants to n ≤ 10⁶
Golden angle 360/φ² = 137.507764°exactcomputed live from φ; the angle no rational crowds
Golden gaps at n = 10⁶stored5.3749·10⁻⁷ (×167960), 8.6968·10⁻⁷ (×485771), 1.4072·10⁻⁶ (×346269); the first two sum to the third exactly — report §3
Distinct count = 2 at each convergent q_kexact0 misses / 38 q_k across the named constants; j₊, j₋ are always best-approximation denominators (0 misses / 5992)
Hurwitz: liminf q‖qα‖ = 1/√5 = 0.447214 (golden)storedHurwitz 1891; measured at q = 121393 over the window q ∈ [10⁵, 2·10⁵]; the largest such constant of any irrational
Parastichies golden = Fibonacci, √2−1 = PellexactCF denominators; cross-checked against mpmath in the Python reference
Packing score, golden N = 500 = 0.841084measuredmin nearest-neighbour ÷ ideal hexagonal 1.9046; recomputed live in section V; matches the mpmath reference to 10⁻⁹
Packing grid, 10,000 α at N = 400storedmaximiser 0.61805 (golden to grid resolution); the top five are all noble — CF tails all 1s
Precision conventionexactrational α exact over its denominator; irrational α replaced by a convergent with Q > n·10⁶, verified identical against Q > n·10¹⁵ (values agree to 10⁻¹⁵)

References

H. Steinhaus posed the conjecture (~1950s). V. T. Sós, On the distribution mod 1 of the sequence nα, Ann. Univ. Sci. Budapest (1958); S. Świerczkowski (1958); J. Surányi (1958) — the three independent proofs. A. Hurwitz (1891) — liminf q‖ = 1/√5 for the golden ratio, the largest such constant of any irrational. H. Vogel, Math. Biosci. 44 (1979) — the r = √n phyllotaxis model. A. Khinchin, Continued Fractions; G. H. Hardy & E. M. Wright, An Introduction to the Theory of Numbers — convergents, semiconvergents, noble numbers. All cited from knowledge: this build had no network, so titles, years and attributions are unverified; the mathematical content each supports is verified numerically in the kernel's tests.

Contact the author: np56123@icloud.com