Number Sequence Puzzles: How to Find What Comes Next

This article was written with AI and may contain mistakes. Found one? Tell us.

By Riddle10 Editorial Published 10 min read

To solve a number sequence puzzle, write down the gap between each pair of neighbouring terms, and if those gaps are not all equal, write down the gaps between the gaps. If neither row settles it, test whether each term is the sum of the two terms before it, and always run your rule across every term before you trust it.

This guide turns that into a five-step method. It compares the common rules in a table, works through two full examples, covers no-repeat strings and ends with a practice set and its answers.

What is a number sequence puzzle?

A number sequence puzzle gives a short row of numbers made by a hidden rule and asks for the next term or a missing one. The rule is usually simple. The challenge is that you only see what the rule produced, so you have to reason backwards from a handful of terms to the rule itself.

Some puzzles of this kind use no arithmetic at all. A no-repeat puzzle gives a string of symbols and asks which symbol may come next without creating a block that appears twice in a row. That rule has its own tidy mathematics, covered later on.

Which rules come up most often?

Most what-comes-next puzzles rely on a small set of rules. Learn to recognise these and you can handle many of the puzzles you meet.

RuleWhat you checkExampleNext term
Same gapNeighbouring terms differ by one fixed amount4, 9, 14, 1924
Steadily growing gapThe gaps themselves change by a fixed step3, 4, 7, 12, 1928
Same multiplierEach term is a fixed multiple of the one before3, 6, 12, 2448
Add the two previousEach term equals the two before it added together2, 7, 9, 16, 2541
No repeated blockNo stretch of symbols is followed at once by a copy of itself1, 2, 1, 3Depends on the string

The first two rules are about differences and the third is about ratios. The fourth links each term to two earlier terms rather than one, which is why it fools solvers who only look at gaps.

How do you solve a sequence puzzle step by step?

  1. Write the first differences. Under each pair of neighbours, write the later term minus the earlier one. If every difference is the same, you have a same-gap rule, so add that gap to the last term.
  2. Write the second differences. If the first differences change, write the differences between them on a new row. If that row is constant, the gap grows steadily. Extend the bottom row, then rebuild upwards.
  3. Try ratios. If the terms climb very fast, divide each term by the one before. A constant answer means a same-multiplier rule.
  4. Try adding the two previous terms. From the third term on, ask whether each term equals the two before it added together. One failure anywhere rules this out.
  5. Check every term. Run your rule from the first term to the last. A rule that fits most terms but misses one is the wrong rule.

If two different rules fit every term you were given, the puzzle is ambiguous, and a fair puzzle should not be. A well-made sequence puzzle gives enough terms that only one rule survives.

How does a difference table work?

A difference table stacks the rows from steps 1 and 2 under each other. Take the steadily growing example from the table above, 3, 4, 7, 12, 19.

RowValues
Terms3, 4, 7, 12, 19
First differences1, 3, 5, 7
Second differences2, 2, 2

The bottom row is constant, so extend it with one more 2. The next first difference is 7 + 2 = 9, and the next term is 19 + 9 = 28.

The same table handles harder puzzles. If the second differences still change, go one row further down. Each extra row needs more terms before it is convincing, so setters rarely go deeper than two rows.

How does the add-the-two-previous rule behave?

Pick any two starting numbers, then keep adding the last two terms to get the next one. Starting with 2 and 7 gives 2, 7, 9, 16, 25, 41, 66 and so on. The terms grow fast.

Now look at the gaps of that row: 5, 2, 7, 9, 16, 25. From the second gap on, the gap row is the sequence itself again, shifted along by one place. That is the telltale sign. When the differences look like earlier terms of the same row, test the sum rule.

Two starting numbers decide everything that follows, and that leads to a surprising question. Can you pick a starting pair with no common factor so that no term of the endless row is ever a prime number?

Can such a sequence avoid primes forever?

Yes. A paper published on 6 November 1999 describes a construction from 1964 that produced a prime-free sequence of this kind from a 34-digit pair of starting numbers with no common factor [1]. The same paper reports that two smaller starting pairs, each with 17 digits, were obtained in 1990 [1].

That 1999 paper then gave a much smaller starting pair, 407389224418 followed by 76343678551, whose add-the-two-previous sequence contains no prime at all [1]. To reach it, the author worked through 1,658,880 possible cases and kept the smallest pair [1].

The idea behind the construction is a covering of the whole numbers. Every position in the sequence falls into at least one of a fixed list of remainder classes, and each class is tied to a prime that divides every term sitting in those positions [1]. So every term has a factor from that fixed list of primes, which is what keeps every term composite [1].

You will never meet starting values that large in a puzzle. The lesson for solvers is simpler: two starting values pin down the whole row, so a sum-rule puzzle with blanks near the start can usually be solved by working forwards or backwards.

What is a no-repeat sequence?

A no-repeat sequence is a string in which no block of symbols is immediately followed by an exact copy of itself. Blocks of any length count. The string 1, 2, 3, 2, 3 fails because the block 2, 3 is followed at once by 2, 3 again, and 1, 1 fails because a single 1 is repeated.

With only two symbols you run out of room almost at once. The string 1, 2, 1 is fine, but adding a 1 repeats the final 1, and adding a 2 gives the block 1, 2 twice in a row. Trying every short string confirms it: no string of two symbols longer than three places avoids a repeat.

With three symbols the picture changes completely. A classical theorem, described in a paper published on 6 November 2002, says that three symbols are enough to write no-repeat strings of any length you like [2]. That paper defines the rule just as above: no two neighbouring blocks of the string may be identical [2].

The same paper looks at stronger versions of the idea [2]. One colours a chessboard so that the colours met along any straight run of queen moves never form a repeated block, and for boards larger than four by four at least five colours are needed, with five being enough [2]. Another asks the rule to hold not only along the string but also along every second symbol, every third symbol and so on, and computers produced very long strings of that kind for every step size up to 100, using just two more symbols than the largest step [2].

How do you solve a no-repeat puzzle?

A no-repeat puzzle gives the start of a string and asks which symbol may come next. The method is a check that works back from the end.

  1. Add a candidate symbol to the end of the string.
  2. Compare the last symbol with the one before it. A match is a repeat.
  3. Compare the last two symbols with the two before them, then the last three with the three before them, and so on until the block would run past the start.
  4. If any comparison matches, cross the candidate out. If none does, the candidate is allowed.

You only need to check blocks that end at the new symbol, because the string had no repeat before you added it. That keeps the work short.

A string can also paint itself into a corner. The string 1, 2, 1, 3, 1, 2, 1 has no repeat, yet nothing can follow it. A 1 repeats the final 1, a 2 repeats the block 1, 2, and a 3 makes the whole string the block 1, 2, 1, 3 twice over. When you build a no-repeat string by hand and hit a dead end like this, step back one symbol and try another choice.

How does the method solve a missing-term example?

Here is an original puzzle. Find the missing term in 5, 6, 9, 14, ?, 30.

Step 1: first differences. The known neighbours give gaps of 1, 3 and 5. The two gaps after 14 are unknown, but together they must cover the climb from 14 to 30, which is 16.

Step 2: second differences. The known gaps grow by 2 each time, so the next two gaps should be 7 and 9. That gives 14 + 7 = 21 for the blank, and then 21 + 9 = 30, which matches the last term.

Step 3: rule out the others. The gaps are not all equal, so the same-gap rule fails. The ratios 6 over 5 and 9 over 6 differ, so the multiplier rule fails. And 5 + 6 = 11, not 9, so the sum rule fails at once.

Step 4: check every term. With the blank filled the row reads 5, 6, 9, 14, 21, 30, and the gaps 1, 3, 5, 7, 9 grow by 2 all the way along. A computer search over whole-number fills, tested against the four arithmetic rules in the table, confirms that 21 is the only answer.

How does the method solve a two-blank example?

Fill both blanks in 4, 7, ?, 18, 29, ?.

Step 1: same gap. The first gap is 7 - 4 = 3 and the gap from 18 to 29 is 11. They differ, so this rule is out.

Step 2: steadily growing gap. Between 4 and 29 there are four gaps, running from 3 up to 11. If they grew by one fixed step, three equal steps would have to add up to 8, and 8 does not split into three equal whole numbers. Whole-number terms always give whole-number gaps, so this rule is out too.

Step 3: same multiplier. Going from 4 to 7 means multiplying by 7 over 4, and 7 times 7 over 4 is not a whole number. The multiplier rule is out.

Step 4: add the two previous. 4 + 7 = 11, so try 11 in the first blank. Then 7 + 11 = 18 and 11 + 18 = 29, both matching the terms given. The final blank is 18 + 29 = 47.

Answer: 4, 7, 11, 18, 29, 47. The whole-number search finds no other fill under any of the four rules.

Which mistakes catch people out?

  • Stopping at the first pattern. A rule that fits the first three terms can break on the fourth, so always run step 5.
  • Trusting too few terms. The row 2, 4, 8 fits doubling, which gives 16 next, and it also fits gaps of 2 and 4 that grow by 2, which gives 14 next. A fair puzzle gives enough terms to settle it.
  • Forgetting the sum rule. If the gaps look random but keep echoing earlier terms, test the two-previous rule before anything fancier.
  • Slips in the difference table. Most wrong answers come from one bad subtraction, so redo each row once.
  • Checking only short blocks. In no-repeat puzzles, a long block can repeat even when every short one is fine.

Can you solve these practice puzzles?

Each of the first two rows follows one rule from the table. Try them before reading the answers.

  1. Fill the blank: 7, ?, 13, 19, 27.
  2. Fill both blanks: 3, ?, 10, 17, 27, ?.
  3. Using only the symbols 1, 2 and 3, which symbol can come next in 1, 2, 1, 3, 1, 2, 3, 1 without creating a repeated block?

Answers

  1. 9. The gaps 2, 4, 6, 8 grow by 2. Watch the trap: a blank of 6 fits the sum rule for two terms, since 7 + 6 = 13 and 6 + 13 = 19, but 13 + 19 = 32, not 27.
  2. 7 and 44. This is the sum rule: 3 + 7 = 10, 7 + 10 = 17, 10 + 17 = 27 and 17 + 27 = 44.
  3. Only 3. Adding 1 repeats the final 1. Adding 2 makes the string end with the block 3, 1, 2 twice in a row. Adding 3 leaves no repeated block anywhere.

Ready for a live one? This puzzle rewards the difference table: write the gaps under the terms, then the gaps between the gaps, and the next term falls out.

References

  1. Nicol, J. W. (1999, November 6). A Fibonacci-like Sequence of Composite Numbers. The Electronic Journal of Combinatorics, 6(1), R44. DOI 10.37236/1476
  2. Grytczuk, J. (2002, November 6). Thue-like Sequences and Rainbow Arithmetic Progressions. The Electronic Journal of Combinatorics, 9(1), R44. DOI 10.37236/1660

number sequence puzzles number puzzles what comes next difference table no repeat sequences step by step

More reading