Multiplying every number on the dial at once
Worth reading first: Numbers that wrap · Two dials at once.
Numbers that wrap followed a single number round a dial as it was multiplied by 2 over and over: and back to on a dial of thirteen. That is one orbit, traced from one starting point. Multiplication by 2 does something to every residue at once, and the natural picture of that is not a path but a map: every point on the dial joined to the point it is sent to.
Draw it and something appears that no single orbit shows. On a large dial the chords from to crowd together along a heart-shaped curve with one cusp, and the chords from to along a kidney-shaped curve with two. Each multiplier has its own curve, and the curve has exactly one cusp fewer than the multiplier. This essay explains the curve, and on the way finds that the picture holds three separate pieces of arithmetic: when multiplication is reversible, how it splits the dial into cycles, and why those cycles are necklaces.
A small dial first, and a collapse
On a dial small enough to read, the chords can be followed one at a time. With twenty-four places and the multiplier 2, residue goes to , to , to , and to .
The chords land only on even residues, and each even residue receives two of them: and both go to , and both go to . The reason is that , so adding to anything does not change its double. Multiplying by on a dial of collapses the dial onto residues, each hit times, and the collapse is visible as pairs of chords converging.
When and share no factor the collapse vanishes. Then has an inverse on the dial — a number that undoes multiplication by , found by running Euclid’s algorithm backwards — and so multiplication by can be undone, which means no two residues go to the same place. The chords are then a permutation of the dial: every residue sends one chord out and receives exactly one. On the dial of 199 in the first figure that is automatic, since 199 is prime.
A permutation splits into cycles
A permutation of a finite set, followed from any starting point, must eventually return, because there are only finitely many places to go and nowhere is visited twice without closing a loop. So the permutation breaks the dial into disjoint cycles. For multiplication those cycles have lengths that can be predicted from the arithmetic alone.
The cycle through is and back, of length — the smallest number of doublings that returns to itself, which is the order of modulo . Every residue that shares no factor with lies on a cycle of exactly that length, because the cycle through is just the cycle through multiplied by , and multiplying by is itself a permutation of those residues. So the twelve residues coprime to fall into two cycles of six.
That observation is Euler’s theorem, drawn. The residues coprime to — there are of them, twelve on the dial of twenty-one — are cut by the permutation into cycles that all have the same length, the order of . Cycles of equal length that exactly fill a set of twelve must have a length that divides twelve. So the order of divides , and multiplying by a full times returns every unit to itself: . On a prime dial, where , it is Fermat’s little theorem, and the proof is a count of polygons of equal size.
The other residues behave like residues on a smaller dial. The multiples of — — are three times the residues of a dial of seven, and doubling them is doubling on that dial, where has order . So they fall into two cycles of three. The multiples of — and — are seven times the residues of a dial of three, where has order , and they swap. Zero is fixed. In general, the residue lies on a cycle whose length is the order of modulo , and every such length divides the order of modulo itself. The figure checks both statements on every cycle it draws.
Counted up, the number of cycles is a sum over the divisors of : each divisor contributes the residues whose “own dial” has size — there are of them — in cycles of length equal to the order of modulo . That formula looks like a curiosity, and it is the formula for counting necklaces.
Doubling on a dial of turns necklaces
Take the dial of and write each residue in binary with exactly digits. Doubling a number shifts its binary digits one place to the left, and on this dial the digit that falls off the top reappears at the bottom, because . So doubling modulo is rotation of an -bit string, and its cycles are the sets of strings that are rotations of one another — the necklaces.
On the dial of fifteen the cycles are the rotation classes of four-bit strings: are ; are and its rotations; are and , a necklace with only two distinct rotations; are the strings with three ones. The sixth binary necklace of length four, , is fifteen, which the dial identifies with . So the count of cycles, five, is the count of binary necklaces, six, less one.
The count works at every length. The number of binary necklaces of length is — each rotation class counted by averaging, over the rotations, the number of strings each rotation leaves unchanged — and doubling modulo has exactly one cycle fewer than that. On the dial of there are cycles and necklaces of length five; on , cycles and necklaces of length six; on , and ; on , and . The one necklace lost is always the same: the string of all ones, which the dial cannot tell from the string of all zeros.
That identification is what makes the arithmetic of necklaces and the arithmetic of multiplicative orders the same subject. Fermat’s little theorem proved by counting necklaces runs the correspondence in one direction; the cycle count above runs it in the other. And the necklace that returns after fewer than rotations, like , is a residue whose own dial is smaller: shares the factor with , and on the dial of three, doubling has order .
The curve the chords crowd onto
On a dial of a few hundred places the chords stop reading as individual lines and start reading as a shape, and the shape is the envelope of the family: a curve that touches every chord. It is easiest to find by letting the dial become a continuous circle, with a chord from each angle to the angle .
Put the circle in the complex plane, so the chord joins to . The point
is a weighted average of the chord’s two ends, so it lies on the chord, a fraction of the way from towards . Differentiating, is a multiple of , and for two points on the unit circle the sum of their positions is perpendicular to their difference, so runs along the chord. The curve therefore touches every chord where it crosses it: is the envelope. The figures check both facts — on the chord, and along it — at a spread of chords.
is an epicycloid: the path of a point on a small circle rolling round the outside of a larger one. Its cusps are where it stops moving, where , which needs — the chord’s two ends diametrically opposite — or . That happens times round the circle. So the chords from to envelope an epicycloid with cusps: one for doubling, the cardioid; two for tripling, the nephroid; and one more for each step up.
The small multiples make the pattern plain, and they show something the formula does not dwell on: a residue with gives a chord of length zero, and those fixed points are where the chords are shortest and densest, near the cusps. On a dial of there are of them, since must be a multiple of .
The same curve is drawn by light in a cup
The envelope has a physical reading that makes the multiplication tables less arbitrary than they look. A ray of light inside a circular mirror, travelling along a chord from angle to angle , reflects off the mirror and leaves along the chord to : the angle of incidence equals the angle of reflection, and on a circle that is a statement about arcs.
Put a point source of light on the rim at angle . A ray that first strikes the mirror at angle reflects along the chord from to . The reflected rays are the chords of the doubling table, and where they crowd together the light is brightest: the bright curve, the caustic, is the cardioid. With the source infinitely far away instead, so that the incoming rays are parallel, the reflected chords run from to plus a fixed half-turn, and the caustic is the two-cusped nephroid — the bright curve that sunlight draws on the surface of coffee in a round cup.
That is the same family of curves, drawn by the same geometry, that a billiard ball in a round table traces out as its caustic circle when it keeps bouncing at a fixed angle. There the chords are , all the same length, and the envelope is a circle; here they are , of every length, and the envelope has cusps.
The dial is a window onto a chaotic map
There is one more reading of the chords, and it connects the dial to dynamics. Divide every residue by and the dial of becomes the equally spaced fractions on a circle of circumference one. Multiplying by modulo becomes multiplying the fraction by and discarding the whole part — the map on the circle.
That map, for , is the doubling map, one of the simplest chaotic systems there is: it doubles every distance, its orbits are the binary expansions of read one digit at a time, and almost every orbit wanders over the whole circle with no pattern. The fractions with denominator are a finite set it maps to itself, and on them every orbit is periodic. So the cycles drawn on the dial are periodic orbits of a chaotic map, and the periodic orbits of the doubling map are exactly the fractions with odd denominators, since those are the ones whose binary expansions repeat. The dial of fifteen shows the periodic points of period dividing four; the dial of twenty-one, those whose periods divide six.
Seen that way, the chord pictures show both halves of the doubling map’s character. The cycles are its orderly part, the periodic orbits, finitely many at each denominator. The envelope is its disorderly part: as grows the chords fill in densely, every residue’s image lies far from the residue itself, and nothing in the picture stays still except the one fixed point the cusp marks.
What the chords cannot show
They cannot show the envelope exactly. On a finite dial there are finitely many chords, and the dashed curve is drawn from its formula, not traced from the chords. The chords approach it as the dial grows, and the figures check that the formula’s curve touches every chord it is compared with; they do not, and cannot, show a limit.
They cannot show which multipliers generate. Whether some has a single cycle through all the units — a primitive root — is visible only as a cycle of full length in a picture like the one on the dial of twenty-one, and the question of which dials have such an is a theorem about counting that no chord picture decides.
And they cannot show large dials’ cycles. On a dial of 199 the cycles of doubling have length 99, the order of modulo , and the two long cycles are drawn together as one tangle of chords. The cycle structure is computed and checked; it is only legible on small dials.
Where the dials go next: powers of one prime
The cycle lengths are orders, and orders behave in a striking way on dials whose size is a power of a single prime. On a dial of three, doubling has order ; on a dial of nine, order ; on twenty-seven, ; on eighty-one, ; on two hundred and forty-three, . Each step up the powers of three multiplies the order by three. The doubling chords on a dial of form one long cycle through every residue coprime to three, and that cycle grows by a factor of three each time the dial does.
The reason is one line of the binomial theorem. Suppose is on the dial of , so that for some whole number . Cubing,
and every term after the is a multiple of . So is on the next dial up. The order there is therefore a divisor of and a multiple of — since anything that is on the larger dial is on the smaller — which leaves exactly two possibilities: it stays , or it becomes . It stays only if was already on the dial of , which is a coincidence of one extra digit, and the same argument works for every odd prime in place of three. For most primes and most multipliers the order multiplies at every step. The rare primes where it stalls at the first step are the subject of two primes where Fermat holds twice, and they are genuinely rare: for the multiplier 2, only two are known.
The same lifting, done not to orders but to roots — solving an equation on a dial of and then on , and beyond, one digit at a time — is where the next essay goes. It turns a finite dial into an infinite sequence of ever finer dials, and the sequence into a new kind of number.
One map, drawn whole
Multiplying by on a dial of , drawn as a chord from every residue to its multiple, is a two-to-one collapse wherever shares a factor with and a permutation where it does not. The permutation breaks the dial into cycles whose lengths are the orders of on the dial and on the smaller dials of its divisors, and on the dial of doubling rotates binary strings, so its cycles are the necklaces.
As the dial grows the chords crowd onto an epicycloid with cusps, the curve a point on a rolling circle traces, because the point a fraction of the way along each chord moves along the chord itself. The same curves are the caustics of light reflected in a circle, and the same cycles are the periodic orbits of the chaotic map .
Drawing a map whole, rather than following one point through it, turns its algebra into geometry — and the geometry keeps turning up elsewhere.
What links here
Computed from the collection, not written here: the essays that point at this one.
Reads more easily once this is understood
Essays that name this one as worth reading first.
Shares its objects with
Essays that name at least two of the same things, and that neither author linked.
- Colourings nobody can tell apart — both name orbit, permutation
- Necklaces made of symmetries — both name necklace, orbit
- Sensitivity comes free — both name doubling map, orbit
- The exponent that is smaller than Euler's — both name modular arithmetic, order
- The puzzle that is exactly half solvable — both name orbit, permutation
Named objects
A dashed tag is an object no other essay names yet.
CausticDoubling mapEnvelopeEpicycloidModular arithmeticNecklaceOrbitOrderPermutation