# Find the pattern in this encrypted sequence

Fill in the question mark in the sequence:

tfgz, aqt, its, pxoii, xhfa, nlif, nxi, ezfzh, cqiob, ctcm, swyvyus, frifri, zpfhdz, bfkztlkk, mhztmbx, rzboekb, ?

Hint 1:

3657500101

Hint 2:

• Has a correct answer been given? If so, please don't forget to $\color{green}{\checkmark \small\text{Accept}}$ it. If not, a comment to the answerers to help them satisfactorily complete their answers would be helpful.
– Rubio
Commented Mar 15, 2023 at 3:43

Solution:

pmrdoc, hyplprpy, kissjbnf, bfkfvfk, bxwdcvw

Following up on @Parcly Taxel's partial answer:

Each word has been enciphered monoalphabetically. There are 16 alphabets, so lay them out in an enciphering matrix as if solving a polyalphabetic system.

p ABCDEFGHIJKLMNOPQRSTUVWXYZ
0     f         z  g       t
1     t        qa
2               s    i  t
3     i  x         o p
4      x        h  a  f
5     fn  l            i
6         x         n    i
7     z             e  f
8     c ioq          b
9     m   t    c
10    y        ws  u       v
11    i        rf
12    f        pz    h  d
13    k  t     fb    z
14    z
15    bo  e    zr      k

Many alphabets have letters in common. For example, alphabets 0 and 12 share the E->f letter. Combine any alphabets that have at least one "tie-in" letter.

p ABCDEFGHIJKLMNOPQRSTUVWXYZ
0     fn  l    pz  g h id  t
1     t        qa
2     y        ws  u i  t  v
3     i  x     rf  o p
4      x        h  a  f
6         x         n    i
7     zt       hm  xe bf
8     c ioq          b
9     m   t    c
13    k  t     fb    z
15    bo  e    zr      k

Notice the rectangle fb:zr in alphabets 13 and 15 under the plain N and O. The same rectangle can be formed in alphabets 0 and 15, using the fb under the plain E and the zr under the plain O. This is the "indirect symmetry" described by Friedman, meaning the cipher is essentially a shift cipher. Note the similar rectangle ez:ft in alphabet 0 and the plain line, which is mirrored in alphabet 7. This indicates the symmetry extends to the plain line, which means the cipher is an unknown alphabet sliding against itself. (This is what ACA setters might call a Q3 system.) The next step is to chain out the alphabet using the plain line and any alphabet lines. (See Military Cryptanalytics Part II)

p:0
EFNP VIL OZTH RG WD
p:2
EY NWTI OS RU ZV
p:3
EI HX NROF TP
p:7
SEZ VFT NH OM RX UB
p:15
IEB FOR NZ VK

First, notice that p:3 and p:15 run in opposite directions, and combine them. Apply the graphical method of indirect symmetry, assigning p:0 to the X axis and p:15 to the Y axis. The tie-in VFT allows p:7 to be assigned the interval 2-right and 1-down, and then WTI assigns 3-left and 2-up to p:2.

SVILRGM
UKEFNPX   WD
BOZTH
VILRGM
KEFNPX   WD
BOZTH

A large part of the equivalent alphabet can be read down the columns: SU.VK.IEBLFORNZGPTMXH...... The missing letters are found in the other alphabets and inserted by forming proportions as before. The complete equivalent alphabet is SUWVKDIEBLFORNZGPTMXHAYQCJ, and shifts along this alphabet will encipher all of the given texts. For example, enciphering ZERO to TFGZ is shifting three positions forward along this alphabet; ONE to AQT is ten positions; and so on. Inspecting the decimations of this alphabet, the third one reveals SDFGHJKLZXCVBNMQWERTYUIOPA, an obvious shift from the keyboard alphabet QWERTYUIOPASDFGHJKLZXCVBNM... we could have saved ourselves a ton of time by recognizing the proportion RU:ZV earlier.

Recovering the shift amounts for each pair of plaintext and ciphertext, counting along this original alphabet, yields:
11, 2, 3, 5, 7, 11, 13, 17, 19, 23, 3, 5, 11, 15, 17, 21
This is the sequence of prime numbers, modulo 26 (with a special case for 1 to stop it from giving the entire thing away).
1, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47
Continuing the original sequence:

53  1 ONESIX   PMRDOC
59  7 ONESEVEN HYPLPRPY
61  9 ONEEIGHT KISSJBNF
67 15 ONENINE  BFKFVFK
71 19 TWOZERO  BXWDCVW

I don't think this is the intended solve path.

(Partial)

Each term is a number written digit-by-digit, then put through a straight substitution cipher. Haven't worked out how those ciphers change at every step.

tfgzZEROaqtONEitsTWOpxoiiTHREExhfaFOURnlifFIVEnxiSIXezfzhSEVENcqiobEIGHTctcmNINEswyvyusONEZEROfrifriONEONEzpfhdzONETWObfkztlkkONETHREEmhztmbxONEFOURrzboekbONEFIVE??????ONESIX

• This is as far as I got too, being foiled by the rules of the substitution changing at every term (consider the leading letters in the third and fourth terms as an example). I'm not sure how straightforward this is to resolve given that each ciphertext is so short...
– Stiv
Commented Dec 15, 2021 at 9:46
• Do you use Hint 1? Commented Dec 15, 2021 at 13:17

Some observations and thoughts...

The substitution cipher changes at each term of the sequence, but I don't think they're all unique. I believe there's a recurring pattern to them, e.g. the cipher used for "zero" is the same used for "five" and "twelve." Similarly the cipher used for "two" is the same for "ten," "three" is the same as "eleven", "six" is the same as "thirteen," "seven" is the same as "fourteen," etc.

If we focus on just the substitutions for just the letters "n" and "o", then they are:

pz, qa, ws, rf, ?h, pz, fb, hm, ??, c?, ws, rf, pz, fb, hm, zr

I may just be finding patterns where none exist but these seem to follow some kind of pattern relating to keyboard layout, e.g. the positioning of q relative to a is the same as w relative to s, r to f, etc. It's not definitive but it feels like there's something there.

Regarding the hints:

Hint 2 is a picture of Optimus Prime. This is hinting something to do with prime numbers? Some kind of "transform" that we need to perform on the numbers or letters?

Hint 1 is fascinating - the number 3657500101 is the 13th in a series of Primeth numbers. That is, it's the 13th term in the sequence where the 1st term is the 1st prime (2), then the next term is the 2nd prime (3), the next is the 3rd prime (5), the next is the 5th prime (11), the next is the 11th prime (31), the next is the 31st prime (127), ... I've been trying to come up with some analogue for this process that would explain how to generate the appropriate cipher for each number, but no luck so far.