Discrete

A sequence that reads itself aloud

Start with 1 and describe it: one 1, so 11. Describe that: two 1s, so 21. Then 1211, 111221, 312211, and on. The terms grow by a factor that settles on 1.3035772690…, and John Conway found the reason: every late term is a string of 92 fixed pieces, each of which turns into the same pieces every time, so the lengths obey a 92-by-92 matrix and have a rational generating function. Its denominator factors as x¹⁸ (x − 1)² (x + 1) times a polynomial of degree 71, and the growth factor is that polynomial's largest root.

Worth reading first: A polynomial that counts · The equation a sequence satisfies.

Write down 1. Now describe what is written: one 1, which is 11. Describe that: two 1s, 21. Describe that: one 2, one 1, 1211. Then one 1, one 2, two 1s, 111221; then three 1s, two 2s, one 1, 312211. Each term is the previous one read aloud, digit by digit, counting runs. The rule is a children’s game, and it was first published as a puzzle — what comes next? — whose answer nobody guesses without being told the rule.

Once the rule is known the sequence looks hopeless to analyse. Every term depends on the exact pattern of runs in the one before, and the digits shuffle in ways that seem to admit no structure at all. Yet John Conway showed in 1986 that the lengths grow by a precise factor, λ=1.3035772690…\lambda = 1.3035772690\ldots, and that λ\lambda is an algebraic number — the largest root of a particular polynomial of degree 71. The reason is that the chaos is only local. From the eighth term on, every term is a string of 92 fixed pieces that never influence one another, and the whole sequence reduces to keeping count of how many of each piece there are.

That reduction is a generating function in the most literal sense: the counts obey a matrix, the lengths obey a linear recurrence, and the coefficients of a rational function are what a linear recurrence produces. This essay finds the 92 pieces by brute force, builds the matrix, and computes its characteristic polynomial exactly.

Reading aloud

The look-and-say sequence. 1,2,2,4,6,6,8,10,14,20,26,34
Fig. 1 The first 12 terms of the look-and-say sequence, each the previous one read aloud, with their number of digits. The lengths 1, 2, 2, 4, 6, 6, 8, 10, 14, 20, 26, 34 grow by a factor that settles near 1.3.

The figure writes out the first twelve terms. Their lengths run 1, 2, 2, 4, 6, 6, 8, 10, 14, 20, 26, 34, and they grow, irregularly at first and then steadily. Two facts about the digits are visible already. Only 1, 2 and 3 appear; no term starting from 1 ever contains a 4. That is because a 4 would have to count a run of four equal digits in the term before, and no term after the first two contains such a run. A term is a string of pairs, count then digit, and two neighbouring pairs never have the same digit, since they describe different runs. A run aaaaaaaa would have to cover one whole pair aaaa and parts of its neighbours, and one of those neighbours would then have the digit aa too — the contradiction. The computation confirms it for the first forty terms.

The second fact is that the terms are not built from scratch each time. The end of term 12, 1211, is the end of term 4, still being read the same way, because a reading of a string’s tail does not depend on its head — as long as the boundary between them does not fall inside a run. That is the observation everything else rests on.

A growth factor that settles slowly

How fast the terms grow. ratio at 120: 1.3035772343; L120=102651774490736
Fig. 2 The ratio of each term’s length to the one before, for the first 120 terms. It jumps about at first and then settles on Conway’s constant λ = 1.3035772690, approaching it slowly because the next root has size 1.161.

Divide each length by the one before and the ratios jump about — 2, 1, 2, 1.5, 1, 1.33 — then settle. The figure follows them for 120 terms, by which time the term is far too long to write down: its length alone has fifteen digits. The ratios close in on a single number, drawn dashed, λ=1.3035772690\lambda = 1.3035772690, but they do so slowly, still wrong in the sixth decimal place at the eightieth term.

That slowness is itself information. If the lengths are a combination of geometric sequences, Ln≈aλn+bμn+⋯L_n \approx a\lambda^n + b\mu^n + \cdots, then the ratio Ln+1/LnL_{n+1}/L_n approaches λ\lambda with an error shrinking like (μ/λ)n(\mu/\lambda)^n, where μ\mu is the next largest growth rate in the combination. A slow approach means μ\mu is close to λ\lambda. Here the ratio of the two turns out to be about 0.89, so the error falls by only eleven per cent a step — the same way the roots of a denominator decide how fast a sequence settles in a coin-change count. Both numbers come out of the structure below.

The lengths beyond the fortieth term in the figure were not obtained by writing the terms out. They come from counting pieces, and the first forty, which were written out, agree with the counts exactly at every term — the test that the bookkeeping below is right.

The pieces that never touch

Terms of look-and-say cut into elements. 21+30 | 44+46 | 60+54
Fig. 3 The 9th, 10th and 11th terms cut into elements — pieces whose future readings never interact with their neighbours’ — each labelled by its number among the 92 elements sorted by length.

Call a cut between two digits of a term a split if the two sides, read aloud separately forever after, always give the same result as reading the whole. Conway proved a short list of conditions on the digits around a cut that decide whether it is a split. The computation here does not use them: it tests every possible cut of a string by reading the two halves and the whole eighteen times further and checking that the halves always concatenate to the whole. A cut that survives is taken as a split, and a string with no internal split is an element.

Starting from the thirteenth term, cutting it into elements, reading each element aloud, cutting the result into elements, and repeating until no new element appears, the computation finds exactly 92 elements — Conway’s number. The shortest is 3, which reads as 13; the simplest is 22, which reads as 22 and is the only element that reproduces itself; the longest has 42 digits. Conway named them after the 92 chemical elements from hydrogen to uranium, which is why the theory is called audioactive decay, and the figure shows terms 9 to 11 broken into two elements each.

Each element decays, when read aloud, into a fixed list of elements: 3 becomes 13, which is itself an element; most become two or three. Since the pieces never interact, a whole term decays element by element, and the term after it is just the concatenation of the decays. So from any term onwards the sequence is completely described by 92 numbers — how many copies of each element the term contains — and by the rule taking each element to its list.

How common each element becomes

How common each element is in a long term. top e4:9.179 e2:5.607 e25:4.799; 22 9.1790; diff70 4.05e-8
Fig. 4 The share of all elements in a long term made up by each of the 92, largest first. By the 120th term the counts match the eigenvector of the decay matrix to within a part in a million; 22 is the commonest at 9.179 per cent.

The count vector of the next term is the count vector of this term multiplied by a 92×9292 \times 92 matrix MM, whose column for each element records the elements it decays into. Run that for a hundred steps and the counts all grow, but not at random: the proportions settle down, and the figure draws them, sorted from the commonest element to the rarest. The commonest is 22, the self-reproducing element, at 9.179 per cent of all elements in a long term — common not because it multiplies, since it never does, but because so many other elements decay into it. The rarest makes up about three thousandths of one per cent.

These proportions are an eigenvector. A matrix with non-negative entries in which every element eventually leads to every other — as here, among the 92 — has a single largest eigenvalue, real and positive, with an eigenvector of positive entries, and repeated multiplication turns any starting vector towards that eigenvector. That is the Perron–Frobenius theorem, which also governed the matrix that counts the returns of a map to its starting interval, and it applies to look-and-say for the same reason: a long term is the result of many applications of one non-negative matrix. The figure checks it directly, by comparing the actual counts in the 120th term with the eigenvector computed by power iteration; they agree to within a part in a million.

The total number of elements, and with it the length, grows by the largest eigenvalue each step. Power iteration gives it as 1.303577269034, which is Conway’s constant to twelve places.

The decay matrix

The decay matrix of the 92 elements. nonzero 143; lambda 1.303577269034
Fig. 5 The decay matrix of the 92 elements, sorted by length: column j marks the elements that element j becomes. It has 143 non-zero entries out of 8,464, and its largest eigenvalue is Conway’s constant.

The matrix itself is sparse. Of its 8,464 entries only 143 are non-zero, because most elements decay into one, two or three others, and nearly all the entries are 1. The figure draws it with elements sorted by length, and a diagonal band is visible: an element tends to decay into elements slightly longer than itself, since reading a string aloud tends to lengthen it. The entries above the band are the decays that produce short elements, such as 22, and they are what keep the sequence from simply drifting towards ever longer pieces.

A sparse matrix with a dominant eigenvalue is the whole mechanism. Everything said so far — the growth factor, the proportions, the slow convergence — is a statement about this one matrix, and none of it needed the digits of any term once the elements were known. The digits were needed only to find the elements and their decays, and after that the question became one of the equation a sequence satisfies: the lengths LnL_n are a fixed linear combination of the counts, the counts satisfy vn+1=Mvnv_{n+1} = Mv_n, and by the Cayley–Hamilton theorem the lengths therefore satisfy a linear recurrence whose coefficients are those of the characteristic polynomial of MM. Equivalently, the generating function ∑Lnxn\sum L_n x^n is a rational function whose denominator is that polynomial with its coefficients reversed.

The polynomial of degree 71

The roots of Conway's polynomial of degree 71. deg 71; |roots| max 1.3035772690 next 1.161124 min 0.868981; real -1.08824,-1.01115,1.30358
Fig. 6 The 71 roots of the factor of degree 71 left when x18x^{18}, (x−1)2(x - 1)^2 and x+1x + 1 are divided out of the characteristic polynomial. Conway’s constant is the largest; every other root is smaller, the next at 1.161124, and 3 roots are real.

The characteristic polynomial of a 92×9292 \times 92 integer matrix is a polynomial of degree 92 with integer coefficients, and it can be computed exactly. The computation here reduces the matrix to Hessenberg form modulo three large primes, reads off the polynomial modulo each, combines them by the Chinese remainder theorem, and checks the result modulo a fourth prime. The coefficients turn out to be small — all less than 64 in absolute value, far inside the range the three primes can pin down — and the fourth prime agrees.

Dividing out what can be divided out gives exactly Conway’s factorisation:

χM(x)=x18 (x−1)2 (x+1) P71(x),\chi_M(x) = x^{18}\,(x - 1)^2\,(x + 1)\,P_{71}(x),

with P71P_{71} a monic polynomial of degree 71 and constant term −6-6. The factor x18x^{18} says that the matrix is not invertible: eighteen independent combinations of counts are annihilated within at most eighteen steps and leave no trace in the growth. The factors (x−1)2(x+1)(x - 1)^2(x + 1) belong to parts of the dynamics that neither grow nor shrink — one eigenvalue 1 is the element 22, which simply reproduces itself. Everything about growth lives in P71P_{71}, whose roots the figure plots. The largest is λ=1.3035772690\lambda = 1.3035772690, on the dashed circle; every other root is strictly smaller in size, the next pair at 1.161124. The ratio 1.161/1.304=0.891.161/1.304 = 0.89 is the slow convergence of the growth figure, and the fact that λ\lambda alone sits on the outermost circle is why the proportions of the elements settle at all. Conway proved P71P_{71} irreducible, so λ\lambda is an algebraic number of degree exactly 71 — the largest root of a polynomial that no smaller one shares.

So the surprising connection is that a word game is governed by a polynomial: a growth rate read off as the root of a denominator, exactly as for Fibonacci numbers and the golden ratio, only with a denominator of degree 71 in place of degree 2.

Iterations that forget where they started

Look-and-say belongs to a family of rules that act on the digits of a number or a string and are iterated, and the family divides sharply in two. Some rules shrink. Kaprekar’s routine — sort the digits both ways and subtract — sends every four-digit number into 6174 within seven steps, and summing the squares of the digits sends every number into 1 or into a single cycle of eight, with the share of happy numbers never settling as the range grows. Those rules live on a finite set once the numbers are small enough, and the questions about them are questions about which cycle wins.

Look-and-say grows without limit, and yet it forgets its starting point in a different way. Start from 1, or from 3, or from almost any string at all, and after enough readings the proportions of the 92 elements in the term are the same: the components of one eigenvector. The individual terms never repeat and never shrink, but their composition converges, as a population with fixed birth rates converges to fixed age proportions whatever its initial ages. What is forgotten is not the size but the mixture, and the speed of forgetting is set by the gap between the two largest roots — here a factor of 0.89 a step.

This is the same structure as the most familiar growth rate of all. The Fibonacci numbers count the ways to tile a strip with squares and dominoes, their generating function is x/(1−x−x2)x/(1 - x - x^2), and their ratios tend to the golden ratio of the rectangle that eats itself, the larger root of x2−x−1x^2 - x - 1, with the smaller root, of size 0.618, setting how fast. Look-and-say has the same three ingredients — a finite list of pieces, a fixed rule for what each piece becomes, and a dominant root — with 92 pieces where Fibonacci has two. That the pieces have to be discovered, and that there turn out to be finitely many, is the whole of Conway’s achievement; after it, the analysis is the one every linear recurrence receives.

What the elements do not show

The split test used here is empirical: a cut that survives eighteen further readings is accepted as a split. Conway’s theorem gives conditions that prove a cut is a split for ever, and the computation’s 92 elements, with their decays, agree with his table, but agreement with eighteen readings is not itself a proof. The certainty comes from Conway’s argument, and from the forty terms written out in full matching the element counts exactly.

The picture also says nothing about starting strings other than 1. Conway’s cosmological theorem states that every string other than 22 eventually decays, within a bounded number of steps, into a mixture of the 92 common elements and two extra families of “transuranic” elements containing digits 4 or more, after which everything above holds with a slightly larger matrix. The bound on the number of steps was computed by Conway and Richard Guy, whose proof was lost and has since been reconstructed by computer. None of that is drawn.

And the roots of P71P_{71} are computed numerically, to the accuracy the figure needs. That P71P_{71} is irreducible is Conway’s theorem rather than anything visible in a plot of its roots.

Still open: other readings

The same game can be played with different rules of reading. Read in another base, or count each digit’s total occurrences instead of its runs, or describe a string from right to left, and different growth constants appear, each the root of a polynomial that has to be computed afresh. Some of these variants have been worked out and some have not; there is no general theorem saying which reading rules produce a finite chemistry of elements at all, and for some the number of elements appears to be infinite.

There is also a question about the elements themselves. The decay matrix is irreducible on the 92, so every element appears in every long term with a positive share. But nothing in the eigenvector explains why 22 should be the commonest, or why the shares fall off as they do in the abundance figure. Those shares are algebraic numbers in the field generated by λ\lambda, and whether they have any description simpler than “the components of the eigenvector” is not known.

A word game with a characteristic polynomial

Every term of the look-and-say sequence from the eighth on is a string of 92 elements that decay independently, so the counts obey a 92×9292 \times 92 matrix and the lengths a linear recurrence with a rational generating function. The elements were found here by brute force — every cut tested against eighteen further readings — and came to exactly 92, with 22 the only one that reads itself and the commonest in any long term. The decay matrix is sparse, with 143 entries; its characteristic polynomial, computed exactly modulo primes, is x18(x−1)2(x+1)x^{18}(x - 1)^2(x + 1) times a factor of degree 71, and the largest root of that factor, λ=1.3035772690\lambda = 1.3035772690, is the factor by which the terms grow. The next root, of size 1.161, is why they approach it so slowly.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

Characteristic polynomialEigenvalueExhaustive searchGenerating functionPerron frobeniusRecurrence