All demos

Number theory

The golden angle

Why sunflowers turn 137.5° between seeds, and the theorem that says points placed round a circle by a fixed turn only ever leave three sizes of gap.
Seed k sits at angle 2πkα and at a radius proportional to √k. The arm count is the index step to each rim seed’s nearest neighbour: an observation, not a theorem.

What you're watching

A sunflower drawn from one number

Every seed above is placed by the GPU from its index alone: seed k\blue{k} goes to angle 2πkα2\pi \blue{k}\yellow{\alpha} and radius ck\teal{c\sqrt{k}}. Nothing is stored and nothing is simulated. The turn α\yellow{\alpha} tours a set of fractions and famous numbers, and the arms rebuild themselves from the centre out each time it moves.

Pick your level on the explainer below. The pictures are the same at every level; only the words change.

1 / 8
  1. The question

    A sunflower builds its head one seed at a time. Each new seed is turned by the same angle from the last, then pushed outwards. Turn, drop a seed, repeat.

    Try a quarter turn. A few hundred seeds later they sit on four straight spokes, with empty wedges between them. So the real question is: which turn never makes spokes?

  2. Why the square root

    First the easy half: how far out to push each seed. Push them out by equal steps and the outer rings thin out, because each ring is longer than the one inside it.

    Push each seed out by the square root of its number instead, and every band of 50 seeds covers exactly the same area. The head is equally crowded from the centre to the rim.

  3. Sweep the turn

    Now turn the dial. Every simple fraction of a turn makes spokes: a quarter makes four, a third makes three, two fifths makes five.

    Just off a simple fraction the spokes bend into spiral arms, because every lap the seeds creep a little further round. The closer the turn is to a simple fraction, the straighter the arms.

  4. Count the arms

    Here is a turn of 0.302. Count the arms: ten. And 0.302 is very close to 3/10.

    That’s the pattern every time you try it: the number of arms is the bottom of a fraction sitting very close to the turn. It’s an observation, not something we prove here, but it tells you what to look for. A turn with a simple fraction close by makes visible arms.

  5. The golden turn

    So the best turn is one that no simple fraction gets close to. There is a champion: the golden ratio. A turn of 0.618 has no good fractions to hide behind. Turned the other way, that’s 0.382 of a turn, or 137.5°.

    Zoom in on it on the number line. The fractions that come closest arrive slowly, and they’re all ratios of Fibonacci numbers: 2/5, 3/8, 5/13, 8/21. No spokes ever win, at any scale. This is the angle sunflowers use.

  6. Three gaps

    Now throw the distances away and keep only the angles: drop every seed onto a circle. Colour each gap between neighbours by its length. Then keep adding points.

    However many points you add, there are never more than three gap sizes. And the longest is exactly the other two, laid end to end.

  7. Why only three

    Why? Find the two points that land closest to the starting point, one on each side. Every point’s next neighbour round the circle is reached by one of three moves: step like the first one, step back like the second, or do both.

    Three moves, three gap sizes. Turning the whole picture never changes the moves.

  8. Name it

    This is the three-distance theorem. Hugo Steinhaus asked the question; Vera Sós, János Surányi and Stanisław Świerczkowski each proved it in the late 1950s.

    It holds for any turn. What the golden angle adds is balance: in every case we checked, up to 100,000 points, its largest gap was never more than about 2.6 times its smallest. A turn of 1/π lets them differ by nearly 300 times. A sunflower turning 137.5° keeps its seeds evenly spread at every size.

Checked

The theorem

Three-distance theorem. Let α\alpha be irrational and N≥1N\ge1. The points xk={kα}x_k=\{k\alpha\}, k=0,1,…,N−1k=0,1,\dots,N-1, cut the circle R/Z\mathbb{R}/\mathbb{Z} into NN arcs whose lengths take at most three distinct values. When there are three, the largest equals the sum of the other two.

Read the proof

Conventions. Write fd⁡(u,v)={v−u}∈[0,1)\operatorname{fd}(u,v)=\{v-u\}\in[0,1) for the forward distance from uu to vv on the circle. The gap after xkx_k is fd⁡(xk,xk′)\operatorname{fd}(x_k,x_{k'}), where xk′x_{k'} is the first point met going forward. Since α\alpha is irrational, xj=xlx_j=x_l only if j=lj=l.

Small N. For N=1N=1 there is one gap, of length 1. For N=2N=2 the gaps are {α}\{\alpha\} and 1−{α}1-\{\alpha\}. Assume N≥3N\ge3.

Set-up. Let aa minimise and bb maximise {kα}\{k\alpha\} over k∈{1,…,N−1}k\in\{1,\dots,N-1\} (both unique). Put δ1={aα}\delta_1=\{a\alpha\} and δ2=1−{bα}\delta_2=1-\{b\alpha\}. Since N−1≥2N-1\ge2, a≠ba\ne b and 0<δ1<{bα}<10<\delta_1<\{b\alpha\}<1, so δ1,δ2>0\delta_1,\delta_2>0 and δ1+δ2=1−({bα}−{aα})<1\delta_1+\delta_2=1-(\{b\alpha\}-\{a\alpha\})<1.

Basic bounds. For j≠lj\ne l in {0,…,N−1}\{0,\dots,N-1\} and m=∣l−j∣∈{1,…,N−1}m=|l-j|\in\{1,\dots,N-1\}:

  • if l>jl>j, fd⁡(xj,xl)={mα}≥δ1\operatorname{fd}(x_j,x_l)=\{m\alpha\}\ge\delta_1, with equality iff m=am=a;
  • if l<jl<j, fd⁡(xj,xl)=1−{mα}≥1−{bα}=δ2\operatorname{fd}(x_j,x_l)=1-\{m\alpha\}\ge1-\{b\alpha\}=\delta_2, with equality iff m=bm=b.

Claim. The gap after xkx_k is δ1\delta_1 if k+a≤N−1k+a\le N-1; δ2\delta_2 if k≥bk\ge b and k+a≥Nk+a\ge N; and δ1+δ2\delta_1+\delta_2 if k+a≥Nk+a\ge N and k≤b−1k\le b-1. These cases cover every kk, so every gap lies in {δ1,δ2,δ1+δ2}\{\delta_1,\delta_2,\delta_1+\delta_2\}, which proves the theorem.

Case 1: k+a≤N−1k+a\le N-1. Then fd⁡(xk,xk+a)=δ1\operatorname{fd}(x_k,x_{k+a})=\delta_1. Suppose some xlx_l lies strictly inside that arc. If l>kl>k, then fd⁡(xk,xl)≥δ1\operatorname{fd}(x_k,x_l)\ge\delta_1, a contradiction. If l<kl<k, then k+a−l∈{1,…,N−1}k+a-l\in\{1,\dots,N-1\}, so fd⁡(xl,xk+a)≥δ1\operatorname{fd}(x_l,x_{k+a})\ge\delta_1, again a contradiction.

Case 2: k≥bk\ge b and k+a≥Nk+a\ge N. Then fd⁡(xk,xk−b)=1−{bα}=δ2\operatorname{fd}(x_k,x_{k-b})=1-\{b\alpha\}=\delta_2. If some xlx_l lies strictly inside: for l<kl<k, fd⁡(xk,xl)≥δ2\operatorname{fd}(x_k,x_l)\ge\delta_2; for l>kl>k, l−(k−b)∈{1,…,N−1}l-(k-b)\in\{1,\dots,N-1\}, so fd⁡(xl,xk−b)≥δ2\operatorname{fd}(x_l,x_{k-b})\ge\delta_2. Either way, a contradiction.

Case 3: k+a≥Nk+a\ge N and k≤b−1k\le b-1. Let c=k+a−bc=k+a-b. Then 1≤N−b≤c≤a−1≤N−21\le N-b\le c\le a-1\le N-2, and c≠kc\ne k since a≠ba\ne b. Its forward distance from xkx_k is {(a−b)α}={δ1+δ2−1}=δ1+δ2\{(a-b)\alpha\}=\{\delta_1+\delta_2-1\}=\delta_1+\delta_2. Suppose xlx_l lies strictly inside, so 0<fd⁡(xk,xl)<δ1+δ20<\operatorname{fd}(x_k,x_l)<\delta_1+\delta_2.

  • If l>kl>k, let m=l−km=l-k. Then 1≤m≤N−1−k≤a−11\le m\le N-1-k\le a-1, so δ1<{mα}<δ1+δ2\delta_1<\{m\alpha\}<\delta_1+\delta_2. Then {(a−m)α}=1−({mα}−δ1)>1−δ2={bα}\{(a-m)\alpha\}=1-(\{m\alpha\}-\delta_1)>1-\delta_2=\{b\alpha\}, with a−m∈{1,…,N−1}a-m\in\{1,\dots,N-1\}, contradicting the maximality of {bα}\{b\alpha\}.
  • If l<kl<k, let m=k−lm=k-l. Then 1≤m≤b−11\le m\le b-1, so δ2<1−{mα}<δ1+δ2\delta_2<1-\{m\alpha\}<\delta_1+\delta_2, that is {bα}−δ1<{mα}<{bα}\{b\alpha\}-\delta_1<\{m\alpha\}<\{b\alpha\}. Then {(b−m)α}={bα}−{mα}∈(0,δ1)\{(b-m)\alpha\}=\{b\alpha\}-\{m\alpha\}\in(0,\delta_1), with b−m∈{1,…,N−1}b-m\in\{1,\dots,N-1\}, contradicting the minimality of δ1\delta_1.

So the successor of xkx_k is xcx_c, at distance δ1+δ2\delta_1+\delta_2. If k+a≤N−1k+a\le N-1 we are in Case 1; otherwise either k≥bk\ge b (Case 2) or k≤b−1k\le b-1 (Case 3). ∎

Adversarially reviewed by four independent AI verifiers, each given only the statement and proof (olympiad workflow); all four found no hole.

Further reading

Sources