13.3 Coding, Decoding and Sequences

Key Takeaways

  • A uniform three-position shift maps MASTER to PDVWHU and DOCTOR to GRFWRU.

  • Reverse-alphabet coding maps position n to 27 - n, so L becomes O and C becomes X, and LOGIC becomes OLTRX.

  • For an unordered one-to-one word code, shared words must match shared tokens. After identifying those pairs, use elimination to narrow the remaining choices.

  • If successive differences keep doubling, then 7, 12, 22, 42, 82 continues with 162.

  • With two interleaved series the odd positions and the even positions follow separate rules, so the next term comes from one strand only.

Last updated: November 2026

Five coding families

Many practice letter codes start by numbering the English alphabet. Use these positions to check the examples. A 1, B 2, C 3, D 4, E 5, F 6, G 7, H 8, I 9, J 10, K 11, L 12, M 13, N 14, O 15, P 16, Q 17, R 18, S 19, T 20, U 21, V 22, W 23, X 24, Y 25, Z 26.

Letter-shift coding

In this example the same forward shift applies to every letter. MASTER maps to PDVWHU. Find the shift and use it to encode DOCTOR.

Convert letter by letter. M is 13 and P is 16; A is 1 and D is 4; S is 19 and V is 22; T is 20 and W is 23; E is 5 and H is 8; R is 18 and U is 21. Every letter has moved forward three places, so the rule is position plus 3. DOCTOR then gives D 4 to G 7, O 15 to R 18, C 3 to F 6, T 20 to W 23, O 15 to R 18 and R 18 to U 21, which is GRFWRU. The check is to run the rule backwards on PDVWHU and recover MASTER.

Reverse-alphabet coding

Here the rule is position nn to position 27−n27 - n, so A and Z swap, B and Y swap, and the middle pair M and N swap with each other. LOGIC becomes OLTRX: L 12 gives 15, which is O; O 15 gives 12, which is L; G 7 gives 20, T; I 9 gives 18, R; C 3 gives 24, X.

Number-to-letter coding

With A as 1, the string 3-1-2-9-14-5-20 decodes as C, A, B, I, N, E, T, which spells CABINET. Numbers outside 1 to 26 need another rule before they can map to letters. Use the rule or extra examples supplied in the question.

Substitution coding

Assume each distinct word has one distinct token and token order is shuffled. Under that rule, shared words must appear as shared tokens. If sun rises early is ja la po, early morning walk is po re mi, and walk is healthy is mi tu ka, then early is the only word shared by the first two sentences, so it must be po, the only token those sentences share. Walk is the only word shared by the second and third, so it is mi. In the first sentence ja and la must be sun and rises in some order, and either pairing fits the data. If the example also said sun is bright uses tokens ja tu ke, the unique overlap with the first sentence would identify sun as ja. Then rises would be la.

Conditional coding

One rule does not always fit every letter. Suppose vowels move one step forward through a, e, i, o, u, with u wrapping to a. Each consonant moves one step back in the full alphabet, so its output may be a vowel. PLAN then becomes OKEM: P to O, L to K, A to E, N to M. Read the condition before applying anything, and test the second letter as well as the first, to confirm you are using the appropriate branch of the rule.

Number and letter series

A series item is a search for the operation that carries one term to the next, and test the proposed operation against every given term. The data section introduces common sequence families. Here the worked examples focus on checking a rule.

  1. Differences first. Subtract consecutive terms. Constant differences mean an arithmetic series, and regular changes in the differences can suggest another testable rule.
  2. Ratios second. If earlier terms are non-zero, divide the next term by its predecessor to test for a common ratio.
  3. Squares and cubes third. Compare each term with n2n^2 or n3n^3 for its position, and see whether the remainder is constant.
  4. Two series last. If odd positions and even positions behave differently, split the series into two strands.

Two useful patterns are alternating operations and interleaved sequences. Alternating operations means the rule switches between operations in a repeating order, as in multiply by 2, subtract 3, multiply by 2, subtract 3. Interleaved series means two sequences are woven together, one in the odd positions and one in the even, which is why 2, 10, 7, 17, 12, 24 should be split before it is studied: the odd positions run 2, 7, 12 and the even positions run 10, 17, 24.

Worked number series 1

7, 12, 22, 42, 82, ?

Differences are 5, 10, 20 and 40, each double the one before, so under the same doubling rule, the next difference is 80 and the next term is 82+80=16282 + 80 = 162. A second description fits the same data: each term is double the previous term minus 2, and 82×2−2=16282 \times 2 - 2 = 162 confirms it. Two descriptions agreeing is reassurance, not a problem.

Worked number series 2

2, 9, 28, 65, 126, ?

Differences are 7, 19, 37 and 61. Second differences are 12, 18 and 24, and the third differences are 6 and 6. A constant non-zero third difference is consistent with a cubic rule for equally spaced positions. These terms fit 13+11^3 + 1, 23+12^3 + 1, 33+13^3 + 1, 43+14^3 + 1 and 53+15^3 + 1. Under that rule the next term is 63+1=2176^3 + 1 = 217. Test the proposed rule against each supplied value.

Worked letter series

AZ, CX, EV, GT, ?

Take the two letters separately. First letters are A, C, E and G, positions 1, 3, 5 and 7, advancing by two, so the next is I at position 9. Second letters are Z, X, V and T, positions 26, 24, 22 and 20, retreating by two, so the next is R at position 18. The answer is IR. In A1, C3, F6, J10, continue by increasing each jump by one. The fifth letter position is 10+5=1510+5=15, giving O15 under that rule.

The traps in this section

A series that fits two rules. Short series are under-determined. Given only 2, 4, 8, ? a rule of doubling gives 16 while a rule of growing differences, 2 then 4 then 6, gives 14, and both fit the three terms printed. More given terms can rule out some patterns. If two options follow equally plausible rules, the statement needs another clue to distinguish them.

Uniform shifts applied unevenly. In letter coding, check the shift on the first and the last letter before trusting it. An option containing a single wrong letter can look correct until you test the full mapping.

Direction words. Immediately before, before, next to and two places away are four different constraints, so draw them rather than paraphrasing them.

The missing middle term. Some items print the series with a gap in the middle rather than at the end. There the later terms constrain the earlier ones, and testing the four options in the gap is faster than extrapolating forward.

Series warning. If your rule explains the first three terms but not the fourth, it is not the rule. Look for a consistent rule that also accounts for the later terms.

References

Test Your Knowledge

A code applies the same forward shift to every letter. If MASTER is coded as PDVWHU, how does it encode DOCTOR?

A

GRFWTU

B

GRFVRU

C

GRFWRU

D

GRFXRU

Test Your Knowledge

If the letters A to Z are numbered 1 to 26, which word is written 3-1-2-9-14-5-20?

A

CABINER

B

CABINET

C

CABINIT

D

CABNET

Test Your Knowledge

Each term is one more than the cube of its position, starting with position 1. In 2,9,28,65,126,…2,9,28,65,126,\ldots, what is the sixth term?

A

215

B

219

C

127

D

217

Sections you finish are checked off in the contents.