← Optiver Interview Insights

Optiver·Software Engineer·Technical Phone Screen·Junior

Junior
Jun 2026

Summary

Optiver quant interview, one question that looked like a pattern recognition puzzle but turned into a full recurrence derivation exercise. Shorter than I expected but the depth they wanted on a single problem was no joke.

Questions Asked (1)

Q1

Given the sequence 7, 6, 8, 24, 6, 5, 7... identify the rule generating it, find the next several terms, and write out the recurrence relation formally.

Algorithms & Data Structures
Author's notes

I spotted the subtract 1, add 2 part pretty fast but then stared at the 8 to 24 jump for an embarrassingly long time before realizing it was times 3.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, look for patterns in the sequence, such as alternating operations or grouping into blocks. Notice that the sequence seems to repeat a pattern every 4 terms, so identify the operations within each block and how they relate. Then, formalize the recurrence relation and use it to compute the next terms.

Pro tip: In interviews, always verbalize your thought process and consider multiple hypotheses before settling on one. For sequences, check if the pattern involves alternating operations or periodicity, as these are common in trading firm interviews.

1. Identify repeating blocks

Examine the sequence for repeating patterns. Here, the first four terms are 7, 6, 8, 24, and the next three are 6, 5, 7, suggesting a block of four operations that repeats.

2. Determine operations within a block

Within each block of four terms, deduce the operations: subtract 1, add 2, multiply by 3, then the next block starts with subtract 1 again. Verify with the given numbers: 7-1=6, 6+2=8, 8*3=24, 24-1=23? Wait, the next term is 6, not 23. So the pattern might be different.

3. Re-evaluate pattern

Notice that after 24, the next term is 6, which is 24 divided by 4. So the operations might be: -1, +2, *3, /4, and then repeat. Check: 7-1=6, 6+2=8, 8*3=24, 24/4=6, 6-1=5, 5+2=7, 7*3=21 (but given next is 6? Actually the sequence given is 7,6,8,24,6,5,7,... so after 7, the next would be 7*3=21, but the sequence stops at 7. So the pattern is consistent: -1, +2, *3, /4, repeating.

4. Formalize recurrence relation

Define the recurrence based on position modulo 4. For n ≥ 1, if n ≡ 1 mod 4, a_n = a_{n-1} - 1; if n ≡ 2 mod 4, a_n = a_{n-1} + 2; if n ≡ 3 mod 4, a_n = a_{n-1} * 3; if n ≡ 0 mod 4, a_n = a_{n-1} / 4. Ensure base case a_1 = 7.

5. Compute next terms

Using the recurrence, compute the next several terms: after 7 (the 7th term), the 8th term is 7*3=21, 9th term is 21/4=5.25, 10th term is 5.25-1=4.25, etc. However, note that the sequence might involve integer division or the pattern might be different. Given the context, it's likely the operations are as above, but confirm with the interviewer if division yields non-integers.

Key Points to Mention

  • Pattern recognition: identifying repeating blocks of operations.
  • Alternating operations: subtraction, addition, multiplication, division.
  • Modular arithmetic: using position modulo 4 to define the recurrence.
  • Base case: clearly stating the first term.
  • Edge cases: handling division that may not yield integers, and discussing with interviewer.
  • Verification: checking the recurrence against the given terms.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.