Look and Say Sequence Generator

Type a seed, pick how many terms you want, and read each line as a spoken description of the line above it. Runs of equal digits are shaded so you see the groups that produce the next term. The ladder runs to 50 terms or one million digits, whichever comes first, and the exports carry every digit even when a row on screen is shortened.

Look and say sequence bench

Digits 0 to 9, up to 30 of them. Spaces are ignored.

1 to 50, counting the seed itself.

Seeds

Type a seed, tap one of the seeds below, or press Load sample.

    each run of digits → count + digit

    Say the digits out loud, then write down what you said

    Start from 1. You see one 1, so the next term is 11. Now you see two 1s, which gives 21. Then one 2 followed by one 1, written 1211. No arithmetic happens anywhere. Each term is a spoken description of the one before, turned back into digits.

    TermRead asNext term
    1one 111
    11two 1s21
    21one 2, one 11211
    1211one 1, one 2, two 1s111221
    111221three 1s, two 2s, one 1312211
    312211one 3, one 1, two 2s, two 1s13112221

    John Conway gave the sequence its serious treatment in a 1986 paper with a playful title, The Weird and Wonderful Chemistry of Audioactive Decay. Programmers meet the same rule under another name, count and say, as LeetCode problem 38. Click any row in the ladder above and the Read aloud box spells out the runs for that term, one chip per run, followed by the term they produce.

    Why the digits never climb past 3

    Start from 1 and the sequence never writes a 4, a 5, or anything higher. The reason fits in a few lines. A term is a chain of pairs, a count and then a digit. Suppose four identical digits ever sat side by side, say 2222. Read as pairs, those are two 2s followed by two 2s, two neighbouring runs of the same digit. A correct description would have merged them into four 2s, so the situation never arises. After the first step no run is longer than 3, every count is 1, 2, or 3, and the only digits a term holds are those counts plus whatever digits the seed brought in.

    The generator confirms this on the fly. Seed 1 run to 50 terms ends in a term of 894,810 digits, made of 442,943 ones, 286,629 twos, and 165,238 threes. Not a single 4. The Digit mix stat under the chart shows the same split for whatever seed you type.

    The last digit never changes

    The final run of a term ends in some digit d, and the description of that run ends in d too. So every term ends with the last digit of the seed, forever. Seed 2026 produces 12101216, then 1112111011121116, and every line after closes with 6. The stat panel reports this as Every term ends in, which doubles as a quick sanity check on an exported file.

    22 is the only seed that stays put

    Read 22 aloud and you get two 2s, which is 22 again. Conway showed no other seed describes itself, and every other non-empty seed grows without limit. Tap the 22 chip and the ladder prints the same two digits on every row, with a ratio of exactly 1.0000x down the right side.

    Conway's constant, about 30 percent longer per step

    Term lengths from seed 1 start out jumpy. Two steps keep the length level, at T2 to T3 and again at T5 to T6. Further down, the ratio between neighbouring lengths settles.

    TermDigitsRatio to the term before
    T10201.4286
    T203021.3363
    T304,4621.3085
    T4063,1381.3042
    T50894,8101.3032

    The ratio closes in on 1.303577, known as Conway's constant and written as the Greek letter lambda. Conway derived it as the largest real root of a polynomial of degree 71, built by tracking how 92 recurring blocks of digits feed into each other. In practice the constant gives you a fast estimate. Lambda to the 10th power is about 14.17, so ten more steps make a term roughly 14 times longer. Multiply T40's 63,138 digits by 14.17 and you land within 200 of the real T50.

    The periodic table hidden inside long terms

    Conway noticed that long terms split into blocks that evolve without touching their neighbours. He found 92 of them and named them after the chemical elements, hydrogen through uranium. Hydrogen is 22, the seed that never changes. Uranium is the single digit 3, and its decay chain is the start of the seed 3 sequence: 3, 13, 1113, 3113, 132113. His Cosmological Theorem says every seed, after enough steps, breaks into a mix of these 92 elements plus two transuranic families for strings that carry digits 4 and above.

    This generator does not split terms into Conway's elements. Run shading is the level below that, the pairs that become the next term. Element boundaries depend on what sits on either side of a block, and a decomposition tool needs Conway's full table to get them right.

    Count and say for coding interviews

    The interview version fixes the seed at 1 and asks for term n, with countAndSay(1) equal to "1". The seed is term 1 there, which is the default numbering here. Switch the numbering to Seed is T0 if your source counts the seed as term zero, the most common off-by-one when comparing two lists. LeetCode caps n at 30, and T30 is 4,462 digits long, so the expected answer is a string of 4,462 characters rather than a number. Tap the 1 to T30 chip to see it.

    // JavaScript: one regex pass per term
    const next = s => s.replace(/(\d)\1*/g, run => run.length + run[0]);
    
    # Python: groupby collects each run
    from itertools import groupby
    def next_term(s):
        return "".join(f"{len(list(g))}{d}" for d, g in groupby(s))

    The bug behind most failed hand-written loops is the final run. A loop that writes out a run when the digit changes never sees a change after the last digit, so 1211 comes out as 1112 instead of 111221. Flush the open run after the loop ends, or use one of the two forms above, which handle the end of the string for you.

    Seeds that bend the usual pattern

    Where this generator stops

    Everything runs in this tab. The seed you type, the terms, and the exports never leave your browser, and Copy link puts only the seed and the term count in the address.

    Questions about the look-and-say sequence

    Numbering, mismatched lists, length estimates, and how the exports store long terms.

    Is the seed term 1 or term 0?

    Term 1 by default, matching the count and say convention where countAndSay(1) returns "1". Some textbooks and OEIS-style lists call the seed term 0, which shifts every label by one. The numbering menu next to Shade runs flips between the two, and the CSV and JSON exports record which start you picked, so a file never leaves you guessing.

    My terms differ from another list. What went wrong?

    Four causes account for nearly every mismatch. First, numbering, so check whether the other list starts at 0. Second, runs of ten or more in the seed, which some sites split into runs of 9. Third, leading zeros, which this page keeps and some tools drop. Fourth, a hand-written loop that forgets the final run, which turns 1211 into 1112. Compare the first three terms and the cause usually shows itself.

    How long is term n without generating it?

    Take a length you already know and multiply by 1.3036 once per step. From seed 1, T40 has 63,138 digits, and ten steps on gives 63,138 times 14.17, about 894,700, against the true 894,810. The estimate is poor for the first dozen terms, where the ratio still swings between 1.0 and 2.0, and gets tighter the further out you start.

    Can a term ever be shorter than the one before?

    Yes, and the first step is where it shows. Seeds with long runs collapse, so ten 1s become 101, three digits from ten. After that every run is 1 to 3 digits long and becomes exactly two digits, so a shrink needs a term crowded with runs of three. From seed 1 no term in the first 50 is shorter than the one before it, and lengths stay level only twice, at T2 to T3 and at T5 to T6.

    How is this different from run-length encoding?

    The pairs are the same idea. Run-length encoding turns AAAABBB into 4A3B to save space. Look-and-say applies that encoding to its own output again and again. Because runs after the first step are never longer than 3, the encoding never compresses anything. A run of one digit doubles in size, a run of two keeps its size, and a run of three shrinks to two digits. Single-digit runs outnumber the triples, so the total keeps growing.

    Why does the chart use a log scale?

    Lengths multiply by about 1.3 per step, so on a straight scale the last few bars would fill the panel and the first thirty would sit flat on the axis. On a log scale steady growth by a fixed ratio draws as an even slope, and the early wobble near T2 to T6 stays visible. Hover a bar to read the exact digit count, and the bar for the term you clicked turns orange.

    Which export should I use?

    One term per line for pasting into a test fixture or a text file. CSV with lengths for a spreadsheet, since each row carries the term number, the digit count, and the digits, which makes plotting the growth curve a two-click job. JSON for code, as an object holding the seed, the first index, and an array of strings. Every format stores terms as strings, because T30 and beyond overflow any numeric type.

    Can I share a ladder with someone?

    Copy link builds an address with the seed and the term count in the query string, for example toolexe.com/math/look-and-say?seed=1211&terms=20. Opening it rebuilds the same ladder from scratch in the other person's browser. Shading and numbering choices are not stored in the link, so mention them if your notes depend on T0 numbering.