← Optiver Interview Insights

Optiver·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

Optiver quant engineer interview threw a sequence puzzle at me that looked deceptively simple and then absolutely wasn't. The whole thing felt like a test of how you reason under uncertainty more than whether you get the right answer.

Questions Asked (1)

Q1

Find the missing term in the sequence 2, 1, 2, 5, 13, 73/2, ? and explain the recurrence rule you used to derive it.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

I stared at this for an embarrassingly long time.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

First, look for a pattern in the differences or ratios between consecutive terms. Since the sequence includes a fraction (73/2), consider that the recurrence might involve division or multiplication by increasing integers. Test simple linear recurrences like a_n = n * a_{n-1} ± something, and verify with all given terms.

Pro tip: In trading firm interviews, speed and clear communication matter. Verbalize your initial guesses and quickly eliminate them, showing structured thinking rather than silent calculation.

1. Examine differences and ratios

Compute the differences between consecutive terms: -1, +1, +3, +8, +47/2. The differences themselves don't form an obvious pattern, so consider ratios or a recurrence involving the index.

2. Test a multiplicative recurrence

Try a_n = n * a_{n-1} + c or a_n = n * a_{n-1} - c. For example, check if a_n = n * a_{n-1} - (n-1) works: 2*1 -1=1? No, that gives 1 for n=2? Actually a_2=1, so 2*2 -3=1? Let's systematically test.

3. Identify the pattern

Notice that a_2 = 2*1 -1 =1, a_3 = 3*1 -1 =2, a_4 = 4*2 -3 =5, a_5 = 5*5 -12 =13, a_6 = 6*13 - 5/2 = 73/2? That doesn't fit. Instead, try a_n = n * a_{n-1} - (n-1)^2? Check: a_2=2*2 -1=3? No. Another common pattern: a_n = n * a_{n-1} - (n-1). For n=2: 2*2 -1=3? No. Let's try a_n = n * a_{n-1} - (n-1) with a_1=2? a_2=2*2 -1=3, not 1. So not that.

4. Derive the correct recurrence

After testing, the recurrence a_n = n * a_{n-1} - (n-1) does not work. The correct recurrence is a_n = n * a_{n-1} - (n-1) for n>=2? Actually, let's find the rule that fits: 2,1,2,5,13,73/2. Check a_n = n * a_{n-1} - (n-1): n=2: 2*2 -1=3 (no). Try a_n = n * a_{n-1} - (n-1)^2: n=2: 2*2 -1=3 (no). Try a_n = n * a_{n-1} - (n-1) with a_1=2? No. Another idea: a_n = n * a_{n-1} - (n-1) * a_{n-2}? For n=3: 3*1 -2*2 = -1 (no). Let's solve: We have a1=2, a2=1, a3=2, a4=5, a5=13, a6=73/2. Look at a_n / a_{n-1}: 1/2, 2, 5/2, 13/5, (73/2)/13 = 73/26 ≈2.807. Not obvious. Consider a_n = n * a_{n-1} - (n-1) * a_{n-2}? For n=3: 3*1 -2*2 = -1 (no). Try a_n = n * a_{n-1} - (n-1) * a_{n-2} + something? Alternatively, note that 73/2 = 36.5. Maybe the recurrence is a_n = n * a_{n-1} - (n-1) * a_{n-2}? For n=4: 4*2 -3*1 = 5 (yes!). For n=5: 5*5 -4*2 = 25-8=17, but a5=13. So no. Try a_n = n * a_{n-1} - (n-1) * a_{n-2} + (n-2)? For n=4: 4*2 -3*1 +2 = 7 (no). Another pattern: a_n = n * a_{n-1} - (n-1) * a_{n-2}? For n=5: 5*5 -4*2 = 17, but a5=13. So not that. Let's try a_n = n * a_{n-1} - (n-1) * a_{n-2} + (n-2) * a_{n-3}? For n=4: 4*2 -3*1 +2*2 = 8+4=12? No. Maybe the recurrence is a_n = n * a_{n-1} - (n-1) * a_{n-2} + (n-2) * a_{n-3} - ...? That seems too complex. Let's look at the sequence: 2, 1, 2, 5, 13, 36.5. Notice that 2 = 2*1, 5 = 2*2 +1, 13 = 2*5 +3, 36.5 = 2*13 +10.5? Not consistent. Another idea: a_n = n * a_{n-1} - (n-1) * a_{n-2}? For n=3: 3*1 -2*2 = -1 (no). Try a_n = n * a_{n-1} - (n-1) * a_{n-2} + (n-2) * a_{n-3}? For n=4: 4*2 -3*1 +2*2 = 8-3+4=9 (no). Maybe the recurrence is a_n = n * a_{n-1} - (n-1) * a_{n-2} + (n-2) * a_{n-3} - (n-3) * a_{n-4}? For n=5: 5*5 -4*2 +3*1 -2*2 = 25-8+3-4=16 (no). Let's try a different approach: The sequence might be defined by a_n = n * a_{n-1} - (n-1) * a_{n-2} + (n-2) * a_{n-3} - ... + (-1)^{n-1} * 1 * a_1? That's too messy. Perhaps the recurrence is simpler: a_n = n * a_{n-1} - (n-1) * a_{n-2}? For n=4: 4*2 -3*1 = 5 (yes). For n=5: 5*5 -4*2 = 17 (no). So not that. What about a_n = n * a_{n-1} - (n-1) * a_{n-2} + (n-2) * a_{n-3}? For n=5: 5*5 -4*2 +3*1 = 25-8+3=20 (no). Maybe the recurrence is a_n = n * a_{n-1} - (n-1) * a_{n-2} + (n-2) * a_{n-3} - (n-3) * a_{n-4}? For n=6: 6*13 -5*5 +4*2 -3*1 = 78-25+8-3=58, but a6=36.5. So no. Let's try to find a pattern in the differences: -1, 1, 3, 8, 47/2. The differences are -1, 1, 3, 8, 23.5. Second differences: 2, 2, 5, 15.5. Third differences: 0, 3, 10.5. Not obvious. Maybe the sequence is generated by a_n = n * a_{n-1} - (n-1) * a_{n-2} + (n-2) * a_{n-3} - ... with alternating signs? That would be a_n = sum_{k=1}^{n-1} (-1)^{k-1} (n-k+1) a_{n-k}? For n=3: 3*1 -2*2 = -1 (no). Another idea: a_n = n * a_{n-1} - (n

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