量化金融 · 第 18 册 · 职业发展

Interviews I: Maths, Probability and Speed

本书暂未推出简体中文版。现有版本:English, Français。

Interviews I: Maths, Probability and Speed · 职业发展

4Sequences, Patterns and Aptitude

The items of a first-round online test: the next term of a sequence, a pattern stated in words, a short piece of logic and a quick calculation from a small table. Each item has one rule that fits with less machinery than any rival, and part of the skill is knowing when you have found it. Time yourself: a real test allows well under the star time.

Question 4.1 ★ QT, Trader, Analyst • market maker, bank • junior

What is the next number in the sequence 3, 6, 18, 72?

Answer

Answer to Question 4.1.

The next number is 360.

Look at the ratios: 6/3=26/3 = 2, 18/6=318/6 = 3 and 72/18=472/18 = 4. The multiplier rises by one each time, so the next is 5, and 72×5=36072 \times 5 = 360.

Other rules are weaker. The differences, 3, 12 and 54, have ratios of 4 and 4.54.5, which do not settle into anything. A polynomial through the four terms would fit, but only because four terms always allow one, and a rule with as many free numbers as there are data says nothing.

Follow-up. What is the order of attack on a sequence item? Try differences, then ratios, then two alternating sequences, then powers and primes, then digit tricks. Most items yield to the first three in a few seconds. If nothing appears in 20 seconds, leave it.

Question 4.2 ★ QT, Trader, Analyst • market maker, bank • junior

What is the next number in the sequence 3, 5, 9, 15, 23?

Answer

Answer to Question 4.2.

The next number is 33.

Take differences: 2, 4, 6, 8. They rise by 2 each time, so the next difference is 10, and 23+10=3323 + 10 = 33. In closed form the nn-th term is n2−n+3n^2 - n + 3, and a constant second difference always means a quadratic.

The ratios, 5/35/3, 9/59/5, 5/35/3, 23/1523/15, follow no pattern, so the rule on differences has no serious rival. Three numbers fix a quadratic, and this one is then confirmed by the remaining two terms. That spare evidence is what makes a rule believable.

Follow-up. And if the differences were 2, 4, 8, 16? Then the differences double, and the sequence is 2n2^n plus a constant. Second differences tell the two cases apart: 2, 2, 2 against 2, 4, 8.

Question 4.3 ★ QT, Trader, Analyst • market maker, bank • junior

What is the next number in the sequence 1, 4, 27, 256?

Answer

Answer to Question 4.3.

The next number is 3125.

The terms are 111^1, 222^2, 333^3 and 444^4, so the next is 55=31255^5 = 3125. The clue is that 27 and 256 are both powers. Both ratios and differences grow too fast to be useful: the ratios are 4, 6.756.75 and about 9.59.5, with no pattern.

Compare other power families before committing. Squares give 1, 4, 9; cubes give 1, 8, 27; and only the rule with a rising exponent takes in 256 as well as 27. Both 4 and 256 are powers of 2, but no rule built on powers of 2 can include 27.

Follow-up. What about 1, 2, 9, 64, 625? Those are nn−1n^{n-1}: 101^0, 212^1, 323^2, 434^3, 545^4. The next is 65=77766^5 = 7776.

Question 4.4 ★ QT, Trader, Analyst • market maker, bank • junior

What is the next letter in the sequence O, T, T, F, F, S, S, E?

Answer

Answer to Question 4.4.

The next letter is N.

These are the first letters of the words One, Two, Three, Four, Five, Six, Seven and Eight, so the next is the first letter of Nine.

Treated as letter positions the sequence is 15, 20, 20, 6, 6, 19, 19, 5, which has no arithmetic rule. When a letter sequence refuses to behave as numbers, and repeats letters irregularly, it is usually taken from a list everyone knows: number words, months, days of the week, or planets. The test is that the rule explains every term and has no free parameters.

Follow-up. What letter comes next in M, T, W, T, F, S? S, for Sunday: the days of the week, starting from Monday.

Question 4.5 ★ QT, Trader, Analyst • market maker, bank • junior

What comes next in the sequence A1, C3, F6, J10, O15?

Answer

Answer to Question 4.5.

The next term is U21.

The numbers are 1, 3, 6, 10 and 15, the triangular numbers, with differences 2, 3, 4, 5. So the next is 21. The letters follow the same rule, because each letter is simply the one at that position in the alphabet: A is the first letter, C the third, F the sixth, J the tenth, O the fifteenth, and U the twenty-first.

Spotting that the letter and the number are the same fact is the point of the item. Treated as two sequences, they look like twice the work. No separate rule for the letters would be simpler.

Follow-up. Which term comes after U21? The next difference is 7, which gives 28. The alphabet has only 26 letters, so the item must either stop or wrap around to B. This is why the item stops where it does.

Question 4.6 ★ QT, Trader, Analyst • market maker, bank • junior

What is the next number in the sequence 1, 20, 2, 17, 4, 14, 8, 11?

Answer

Answer to Question 4.6.

The next number is 16.

This is two sequences taken in turn. The odd positions are 1, 2, 4, 8, which double. The even positions are 20, 17, 14, 11, which fall by 3. The next term is in an odd position, so it is 8×2=168 \times 2 = 16.

The clue is that the sequence jumps up and down, while differences of neighbours (19, −18-18, 15, …) follow no pattern. Reading alternate terms gives two very simple rules, each confirmed by three steps.

Classic wrong answer. Answering 8, which is the next even-position term, 11−311 - 3. Count which position comes next: the sequence has eight terms so far, so the ninth is in the odd sequence.

Follow-up. If there are three threads rather than two, how would you notice? Differences at a spacing of three look regular when spacing two does not. Try spacing two first, then three.

Question 4.7 ★ QT, Trader, Analyst • market maker, bank • junior

What is the next number in the sequence 3, 6, 4, 8, 6, 12, 10?

Answer

Answer to Question 4.7.

The next number is 20.

The steps alternate: times 2, minus 2. So 3→6→4→8→6→12→103 \to 6 \to 4 \to 8 \to 6 \to 12 \to 10, and the next step is times 2, which gives 20.

You can also read this as two threads, 3, 4, 6, 10 and 6, 8, 12. The first has differences 1, 2, 4 and the second 2, 4, so both differences double, and the next thread term is 12+8=2012 + 8 = 20. Both readings give 20, because they describe the same sequence. The alternating rule is simpler: it has only two steps, while the threads need two starting points and a doubling.

Follow-up. And the term after that? Minus 2, so 18. On the thread reading it is 10+8=1810 + 8 = 18, and the two views still agree.

Question 4.8 ★ QT, Trader, Analyst, Risk • market maker, bank • junior

A three-by-three grid holds nine figures. Row 1 is a white circle, a grey square and a black triangle. Row 2 is a grey triangle, a black circle and a white square. Row 3 is a black square, a white triangle and one missing figure. What is the missing figure?

Answer

Answer to Question 4.8.

The missing figure is a grey circle.

Each row and each column holds one of each shape and one of each colour, which is the rule behind many matrix items: a Latin square. Row 3 already has a square and a triangle, so it needs a circle. It already has black and white, so it needs grey. The third column confirms this: it has a triangle and a square, so it needs a circle, and black and white, so it needs grey.

Classic wrong answer. Treating the rows as a pattern to copy across, for example shifting row 1 by one place to get row 2. That reading fits the shapes, but the colours do not move in the same way, so the two features must be read separately.

Follow-up. What is the method for a harder grid? Separate the features: shape, colour, count and position. Solve each one on its own. A grid is hard only if you try to see all the features at once.

Question 4.9 ★ QT, Trader, Analyst, Risk, DS • any • junior

At a firm, all the analysts have degrees, and some of the people with degrees are traders. Does it follow that some analysts are traders? Answer yes or no, and justify your answer.

Answer

Answer to Question 4.9.

No, it does not follow.

Look for one situation where the premises hold and the conclusion fails. Suppose the firm has one analyst, Ann, and one trader, Tom, and both have degrees. Then all analysts have degrees, and some people with degrees are traders, yet no analyst is a trader. One counterexample settles the question.

The trap is that the conclusion may well be true at a real firm. The item asks only whether it must be true.

Follow-up. Change the second premise to “some analysts are traders”. What follows? Then some people with degrees are traders, because those analysts have degrees. That conclusion does follow, in every case.

Follow-up. Change it to “no one with a degree is a trader”. What follows? Then no analyst is a trader, since every analyst has a degree.

Why it matters. Reasoning sections test this, and so does reviewing a research claim: “winners have feature XX, and some stocks with feature XX are cheap” does not mean that winners are cheap.

Question 4.10 ★ QT, Trader, Analyst, QD, Dev • any • junior

A list holds five statements. The first says that exactly one statement in the list is false, the second that exactly two are false, the third exactly three, the fourth exactly four and the fifth exactly five. Which statements are true?

Answer

Answer to Question 4.10.

Only the fourth statement is true.

The five statements contradict one another, so at most one can be true. If none were true, all five would be false, and that would make the fifth statement true, which is a contradiction. So exactly one is true, and the other four are false. Exactly four false is what the fourth statement says, so that is the true one.

Every other assignment fails. If only the second were true, there would be four false statements, not two.

Classic wrong answer. Answering that the fifth is true because they all look false. If the fifth were true then all five would be false, including itself, so it cannot be true.

Follow-up. What if the list has nn statements of this kind? The same argument works: exactly one is true, n−1n - 1 are false, and statement number n−1n - 1 is the true one.

Question 4.11 ★ QT, Trader, Analyst • market maker, bank • junior

A rule turns 1 into 2, 2 into 9, 3 into 28 and 4 into 65. What does it turn 5 into?

Answer

Answer to Question 4.11.

It turns 5 into 126.

The rule is n3+1n^3 + 1: 1+1=21 + 1 = 2, 8+1=98 + 1 = 9, 27+1=2827 + 1 = 28, 64+1=6564 + 1 = 65, and so 125+1=126125 + 1 = 126. The clue is that 9, 28 and 65 are each one more than a cube, and those numbers are close enough to be recognisable.

Differences confirm it: 7, 19, 37, then 12, 18, then a constant 6, which is what a cubic gives. Extending that table gives 24, then 61, and 65+61=12665 + 61 = 126. So the table of differences reaches the same answer without spotting cubes at all. A rule of the type times-something-plus-something, an+ban + b, fails at once, since the first differences are not constant.

Follow-up. Why does a table with a constant third difference imply a cubic? Differencing lowers a polynomial’s degree by one, so undoing it raises the degree by one. Start from the constant and sum three times, and you get a polynomial of degree three. For n3n^3 the constant is 3!=63! = 6.

Question 4.12 ★ QT, Trader, Analyst • market maker, bank • junior

In a code, the word CAT is written as 24, and the word DOG is written as 26. How is the word FOX written?

Answer

Answer to Question 4.12.

FOX is written as 45.

Add the alphabet positions of the letters. For CAT, 3+1+20=243 + 1 + 20 = 24. For DOG, 4+15+7=264 + 15 + 7 = 26. So FOX is 6+15+24=456 + 15 + 24 = 45.

The other natural codes fail. Products give 3×1×20=603 \times 1 \times 20 = 60 for CAT, and counting from the end of the alphabet gives 24+26+7=5724 + 26 + 7 = 57. Only one simple rule fits two words, and two words are enough to rule out a rule that fits one by accident: the sum for CAT alone could have been a coincidence, but the same sum on DOG is not likely to be.

Follow-up. Is 45 unique to FOX? No. Different words can share a sum, so a code like this cannot be decoded back. TAX also comes to 20+1+24=4520 + 1 + 24 = 45.

Question 4.13 ★ QT, Trader, Analyst, Risk • any • junior

A car drives 120 km at 40 km/h and comes straight back at 60 km/h. What is its average speed over the whole trip?

Answer

Answer to Question 4.13.

The average speed is 48 km/h.

Average speed is total distance over total time. The trip out takes 120/40=3120/40 = 3 hours, and the trip back 120/60=2120/60 = 2 hours, so the car covers 240 km in 5 hours: 48 km/h. This is the harmonic mean of the two speeds, 2/(1/40+1/60)=482/(1/40 + 1/60) = 48. Notice that the distance does not matter, because it cancels.

Classic wrong answer. Answering 50, the plain average of the speeds. The car spends more time going at the slower speed, so the average must be below 50.

Follow-up. You spend $1000 buying at 40 and another $1000 buying at 60. What is your average price per share? The same calculation, also 48, since you buy 25+16.6725 + 16.67 shares with $2000. Equal money buys more shares at the lower price, which is why regular investing gets below the plain average.

Question 4.14 ★ QT, Trader, Analyst, Risk • any • junior

Pipe A alone fills a tank in 6 hours, and pipe B alone fills it in 3 hours. A drain alone empties a full tank in 4 hours. The tank is empty, and both pipes and the drain are opened together. How long does the tank take to fill?

Answer

Answer to Question 4.14.

The tank fills in 4 hours.

Add rates, not times. In tanks per hour, A adds 1/61/6, B adds 1/31/3 and the drain removes 1/41/4:

16+13−14=2+4−312=14.\frac16 + \frac13 - \frac14 = \frac{2 + 4 - 3}{12} = \frac14.

At a quarter of a tank per hour, a full tank takes 4 hours.

Classic wrong answer. Averaging or adding the times, for example 6+3−4=56 + 3 - 4 = 5 hours. A pipe that takes 3 hours alone must make the two together quicker than 3 hours, and a formula with times added cannot show this.

Follow-up. What if the drain took only 2 hours? The rate would be 16+13−12=0\tfrac16 + \tfrac13 - \tfrac12 = 0, and the tank would stay empty. A faster drain than that means that the level never rises at all.

Follow-up. And with pipes A and B alone, without the drain? The rate is 12\tfrac12 a tank an hour, so 2 hours.

Question 4.15 ★ QT, Trader, Analyst, Risk, DS • any • junior

In a class of 40 students, 25 take mathematics, 18 take physics and 7 take neither. How many take both? If you were not told how many take neither, what range would be possible?

Answer

Answer to Question 4.15.

Ten students take both. Without the figure for neither, the number taking both could be anything from 3 to 18.

Use inclusion-exclusion. Since 7 take neither, 33 take at least one. Then 25+18=4325 + 18 = 43 counts those in both twice, so 43−33=1043 - 33 = 10 take both.

For the range, the overlap is largest when all 18 physics students also take mathematics, which leaves 15 students who take neither. It is smallest when as few as possible take neither: all 40 take at least one, which makes 25+18−40=325 + 18 - 40 = 3 in both.

Classic wrong answer. Answering 25+18−40=325 + 18 - 40 = 3 by leaving out the 7. That is the lower limit, not the answer.

Follow-up. With a third subject, chemistry, what changes? Add the three, subtract the pairwise overlaps and add back the triple overlap. You then need more data, and the same reasoning still gives limits if some of it is missing.

Question 4.16 ★ QT, Trader, Analyst, Risk • bank, hedge fund • junior

Three products have these revenues and costs in two quarters. Margin means revenue minus cost, as a percentage of revenue. Which product’s margin rose by the most percentage points, and which product’s profit rose by the most dollars?

ProductQ1 revenueQ1 costQ2 revenueQ2 cost
X200150250180
Y400320500395
Z12096150111
Answer

Answer to Question 4.16.

Product Z’s margin rose the most, by 6 percentage points. Product Y’s profit rose the most, by $25.

Work out the two margins for each product. X goes from 50/200=25%50/200 = 25\% to 70/250=28%70/250 = 28\%, up 3 points. Y goes from 80/400=20%80/400 = 20\% to 105/500=21%105/500 = 21\%, up 1 point. Z goes from 24/120=20%24/120 = 20\% to 39/150=26%39/150 = 26\%, up 6 points. In dollars the profit changes are +20+20 for X, +25+25 for Y and +15+15 for Z.

The two questions have different answers, which is common in these items. A large base can give the largest dollar change along with the smallest margin change.

Classic wrong answer. Comparing growth in profit as a percentage, which is another question: Z’s 62.5%62.5\% beats X’s 40%40\% and Y’s 31%31\%. Read which of the three measures the item actually asks for.

Follow-up. How do you do this fast? Round to easy fractions and only work out the two candidates that matter. On a test you rarely need all six values exactly.

Question 4.17 ★★ QT, Trader, Analyst • market maker, bank • junior

What is the next number in the sequence 6, 15, 35, 77, 143?

Answer

Answer to Question 4.17.

The next number is 221.

Each term is the product of two consecutive primes: 2×3=62 \times 3 = 6, 3×5=153 \times 5 = 15, 5×7=355 \times 7 = 35, 7×11=777 \times 11 = 77, 11×13=14311 \times 13 = 143, and next 13×17=22113 \times 17 = 221.

The differences are 9, 20, 42 and 66, and their ratios and differences fit nothing simple. Factoring is the step to try when differences fail and the numbers are not powers. Here each term factors into two primes, and the second factor of one term is the first factor of the next, which is too strong a pattern to be an accident.

Follow-up. What would be the rule behind 4, 9, 25, 49, 121? Squares of the primes, so the next is 132=16913^2 = 169. Here a plain “squares” rule is too weak, because it would predict 16 after 9.

Question 4.18 ★★ QT, Trader, Analyst • market maker, bank • junior

What is the next number in the sequence 19, 29, 40, 44, 52, 59?

Answer

Answer to Question 4.18.

The next number is 73.

Each term is the previous term plus the sum of its own digits. So 19+10=2919 + 10 = 29, 29+11=4029 + 11 = 40, 40+4=4440 + 4 = 44, 44+8=5244 + 8 = 52, 52+7=5952 + 7 = 59, and 59+14=7359 + 14 = 73.

The differences, 10, 11, 4, 8, 7, go up and down with no arithmetic pattern, and that is the clue to look at the digits: a step depending on the digits looks erratic but is completely fixed. No rule on the differences alone explains these values with less machinery, because any such rule would need as many free numbers as there are steps.

Follow-up. What about 12, 15, 21, 24, 30, 33? Two rules fit: add the digit sum, or add 3 and 6 in turn. Both give 39 next, and they first disagree after that: 51 against 42. So an item that stops there has one answer, but not one rule, and it is a weak item.

Question 4.19 ★★ QT, Trader, Analyst • market maker, bank • junior

What is the next number in the sequence 2, 3, 5, 4, 9, 7, 8, 27, 9, 16?

Answer

Answer to Question 4.19.

The next number is 81.

This is three sequences in turn. Positions 1, 4, 7, 10 hold 2, 4, 8, 16, which double. Positions 2, 5, 8 hold 3, 9, 27, which triple. Positions 3, 6, 9 hold 5, 7, 9, which rise by 2. The eleventh term is in the second sequence, so it is 27×3=8127 \times 3 = 81.

Try spacing two first: 2, 5, 9, 8, 9 and 3, 4, 7, 27, 16 fit nothing. Spacing three gives three very clean rules, and that is too much order for chance. A clue for threads is that small and large numbers keep alternating, and that numbers such as 9 turn up twice in different roles.

Classic wrong answer. Answering 11, which continues the third thread. The sequence has ten terms so far, and 11=3×3+211 = 3 \times 3 + 2, so the eleventh term belongs to the second thread.

Follow-up. What is the term after 81? The third thread rises to 11.

Question 4.20 ★★ QT, Trader, QD, Dev • market maker, bank • junior

What is the next number in the sequence 1, 2, 3, 4, 5, 10, 11, 12, 13, 14, 15, 20?

Answer

Answer to Question 4.20.

The next number is 21.

This is counting in base 6: no digit is above 5, and after 15 comes 20, as after 5 comes 10. So after 20 comes 21.

The missing digits are the clue. The sequence skips 6, 7, 8, 9 and then 16, 17, 18, 19, which is what happens if those digits do not exist. A rule on the differences alone, five steps of 1 and then a jump of 5, has to treat the start of the sequence as a special case, and it says nothing about what follows 55. Base 6 predicts every jump, including the one from 55 to 100.

Follow-up. What is the value of the term 20 in ordinary numbers? 2×6+0=122 \times 6 + 0 = 12. It is the twelfth term of the sequence.

Follow-up. And in base 3, what would follow 1, 2, 10, 11, 12, 20, 21, 22? 100.

Question 4.21 ★★ QT, Trader, QD, Dev, Analyst • market maker, bank • junior

Each cell of a three-by-three grid shows a square with only some of its four sides drawn. Row 1: the first cell has top and left, the second has left and right, the third has top and right. Row 2: the first has bottom and right, the second has top and right, the third has top and bottom. Row 3: the first has top, left and bottom, the second has left and right, and the third is missing. Which sides does the missing cell have?

Answer

Answer to Question 4.21.

The missing cell has top, right and bottom.

In each row, the third cell holds exactly the sides that appear in one of the first two cells but not both: an exclusive or. In row 1, top appears only in the first and right only in the second, while left is in both and is dropped. In row 2, bottom appears only in the first and top only in the second, while right is in both. In row 3, top and bottom appear only in the first, right appears only in the second, and left is in both. That gives top, right and bottom.

The two other standard rules fail on row 1. The union would have left, and the intersection would be only left.

Classic wrong answer. Using the union for row 3, which gives all four sides. Always test a rule on every complete row before you apply it to the incomplete one.

Follow-up. Is this the same operation as in code? Yes. If each side is a bit in a four-bit number, the third cell is the bitwise XOR of the first two.

Question 4.22 ★★ QT, Trader, Analyst • market maker, bank • junior

Each row of a table holds three numbers, and the third follows from the first two by the same rule. The rows are (2, 3, 13), (4, 1, 17), (1, 5, 26) and (3, 3, 18). What number completes the row (5, 2, ?)

Answer

Answer to Question 4.22.

The missing number is 29.

The rule is a2+b2a^2 + b^2: 4+9=134 + 9 = 13, 16+1=1716 + 1 = 17, 1+25=261 + 25 = 26, 9+9=189 + 9 = 18, and so 25+4=2925 + 4 = 29.

The clue is that large numbers count for far more than small ones: the row (1,5)(1, 5) gives 26, while (4,1)(4, 1) gives only 17. That argues against a plain sum or a product, and for squares. Indeed, no linear rule pa+qb+cpa + qb + c fits all four rows, as three rows fix pp, qq and cc and the fourth then fails. A product plus a constant also fails, since 2×3=62 \times 3 = 6 and 4×1=44 \times 1 = 4 would require constants of 7 and 13.

Classic wrong answer. Fitting a linear rule to two or three rows and stopping. Three rows always fit three free numbers, so this proves nothing. The fourth row is what tests the rule.

Follow-up. How much evidence is enough? A rule is believable when the rows outnumber the free numbers in it. The rule a2+b2a^2 + b^2 has no free numbers at all, and it fits four rows.

Question 4.23 ★★ QT, Trader, QD, Dev • any • junior

Three people each either always tell the truth or always lie. A says that B is a liar. B says that C is a liar. C says that A and B are both liars. Who is telling the truth?

Answer

Answer to Question 4.23.

Only B tells the truth. A and C are liars.

There are just eight cases, and A’s type decides all of them. Suppose A is truthful. Then B is a liar, so B’s claim is false, and C is truthful. But then C’s claim, that A and B are both liars, is true, which contradicts A being truthful. So A is a liar. Then A’s claim is false, so B is truthful. Then B’s claim holds, so C is a liar. Finally C’s claim, that A and B are both liars, must be false, and it is, because B is truthful.

Classic wrong answer. Stopping at the first consistent assignment, without testing the other value of A. A puzzle of this kind can have two solutions, as the follow-up shows, so test both.

Follow-up. What if C instead says that A tells the truth? Then both cases are consistent: A and C truthful with B a liar, or A and C liars with B truthful. The item would have no unique answer.

Question 4.24 ★★ QT, Trader, Analyst, QD, Dev • any • junior

Five runners finish a race with no ties. C finishes ahead of A, and A finishes ahead of B. E finishes immediately ahead of D. B does not finish last. What is the finishing order?

Answer

Answer to Question 4.24.

The order is C, A, B, E, D.

Start with the strongest facts. The chain C ahead of A ahead of B fixes three of the five relative to each other. The pair E and D is locked together, with E immediately ahead of D, so treat it as one block. That leaves four positions for the block: before C, between C and A, between A and B, or after B. B is not last, so something follows B. Only the block is left to follow it, so the block goes last.

There are 5!=1205! = 120 orders in all. The chain keeps 120/6=20120/6 = 20, the block keeps 4 of those, and the final clue leaves exactly one.

Classic wrong answer. Placing E and D without reading “immediately”. Then E ahead of D alone would allow, for example, E, C, A, B, D, in which B is not last either.

Follow-up. And if the clue “B does not finish last” is removed? All four positions of the block are then allowed, so four orders remain, and the item has no single answer.

Question 4.25 ★★ QT, Trader, Analyst • any • junior

Anna is twice as old as Ben was when Anna was as old as Ben is now. Their ages today add up to 63. How old is each of them?

Answer

Answer to Question 4.25.

Anna is 36 and Ben is 27.

Let their ages be AA and BB, with A>BA > B. Anna was as old as Ben is now A−BA - B years ago. At that time Ben’s age was B−(A−B)=2B−AB - (A - B) = 2B - A. The statement says that A=2(2B−A)A = 2(2B - A), so 3A=4B3A = 4B. Together with A+B=63A + B = 63, this gives A=36A = 36 and B=27B = 27.

Check by the story: nine years ago Anna was 27, which is Ben’s age now, and Ben was 18, and 36 is twice 18.

Classic wrong answer. Treating “was” as “is” and writing A=2BA = 2B. The sentence refers to Ben’s age in the past, so a difference of ages must appear. That difference stays the same over time, which is what makes these items easy to set up.

Follow-up. What if the sum were 70? Then A=40A = 40 and B=30B = 30. The ratio of 4:34:3 holds for any sum.

Question 4.26 ★★ QR, QT, DS, Analyst • any • junior

A test item shows 1, 2, 4, 8, 16 and asks for the next number. A candidate answers 31, and can show a formula that fits all five terms and then gives 31. Is the item broken? What answer should you give on a test, and why?

Answer

Answer to Question 4.26.

The item is not broken in practice, and you should answer 32. A formula that gives 31 exists, because a formula can be made to give anything.

Five points fix a polynomial of degree four. Through 1, 2, 4, 8, 16 that polynomial gives exactly 31 next. And by adding c (n−1)(n−2)(n−3)(n−4)(n−5)c\,(n - 1)(n - 2)(n - 3)(n - 4)(n - 5), which vanishes at all five given places, you can make the sixth term anything at all. So no sequence item has a unique answer in logic.

What an item asks is the rule with the fewest free numbers that fits. Doubling needs one starting value and one multiplier, and explains five terms. The polynomial uses five numbers to explain five terms, so it explains nothing.

Follow-up. Does 31 ever arise naturally? Yes. Take nn points on a circle, placed so that no three chords meet at one point, and join every pair: the circle splits into 1, 2, 4, 8, 16, 31 regions, for n=1n = 1 to 6. The count is (n4)+(n2)+1\binom{n}{4} + \binom{n}{2} + 1.

Why it matters. The same argument is the difference between a backtest and an overfit. A model with as many free numbers as data points always fits. What counts is how much it explains per free number.

Question 4.27 ★★★ QT, Trader, Analyst • market maker, bank • junior

What is the next number in the sequence 1, 4, 9, 7, 7, 9, 13, 10?

Answer

Answer to Question 4.27.

The next number is 9.

These are the digit sums of the square numbers: 11, 44, 99, 16→716 \to 7, 25→725 \to 7, 36→936 \to 9, 49→1349 \to 13, 64→1064 \to 10, and next 81→981 \to 9.

The opening 1, 4, 9 points to squares, but 16 is missing. Then 7, 7, 9, 13, 10 follow no arithmetic rule, and the jump down from 13 to 10 is the clue: a smooth formula would not do that, whereas a digit operation does. So you go back to the opening, ask what could turn 16 into 7, and find the digit sum.

Differences fail at once here. Their values, 3, 5, −2-2, 0, 2, 4, −3-3, change sign with no pattern, and a polynomial through eight terms explains nothing.

Follow-up. What is the term after 9? 102=10010^2 = 100, so 1. The large drop is the same effect again.

Question 4.28 ★★★ QR, QT, Trader • market maker, hedge fund • junior

What is the next number in the sequence 1, 2, 3, 7, 22, 155?

Answer

Answer to Question 4.28.

The next number is 3411.

Each term is the product of the two before it, plus one: 1×2+1=31 \times 2 + 1 = 3, 2×3+1=72 \times 3 + 1 = 7, 3×7+1=223 \times 7 + 1 = 22, 7×22+1=1557 \times 22 + 1 = 155. So the next is 22×155+1=3410+1=341122 \times 155 + 1 = 3410 + 1 = 3411.

The clue is growth. The ratios are 2, 1.51.5, 2.332.33, 3.143.14, 7.057.05, and such quick acceleration means terms multiplying each other rather than being multiplied by constants. So test a product of two earlier terms with a small correction. That rule uses just one small number, the +1+1, and it explains four steps.

The rule an=an−12+ca_n = a_{n-1}^2 + c fails: 22+c=32^2 + c = 3 needs c=−1c = -1, while 32+c=73^2 + c = 7 needs c=−2c = -2. A two-term linear rule an=p an−1+q an−2a_n = p\,a_{n-1} + q\,a_{n-2}, fitted to the first steps, gives 8 where the sequence has 22.

Classic wrong answer. Trying a rule of the form an−1×ka_{n-1} \times k with a rising kk. The multipliers are not whole numbers, so this leads nowhere.

Question 4.29 ★★★ QR, QT, Trader, QD • market maker, hedge fund • junior, experienced

What is the next number in the sequence 1, 1, 2, 5, 14, 42? Give the rule. Two other well-known sequences start in the same way: why do they not fit?

Answer

Answer to Question 4.29.

The next number is 132. These are the Catalan numbers, where each term is the one before times (4n−2)/(n+1)(4n - 2)/(n + 1).

The ratios are 11, 22, 5/25/2, 14/514/5, 33. Rewrite them as 2/22/2, 6/36/3, 10/410/4, 14/514/5, 18/618/6: the tops rise by 4 and the bottoms by 1. The next ratio is 22/722/7, and 42×22/7=13242 \times 22/7 = 132. The closed form is 1n+1(2nn)\frac{1}{n + 1}\binom{2n}{n}, and it counts, for example, the ways to write nn pairs of balanced brackets.

The two near neighbours fail on the final terms. The Bell numbers run 1, 1, 2, 5, 15, 52, so they diverge at 14. The sequence (3n−1+1)/2(3^{n-1} + 1)/2 runs 1, 2, 5, 14, 41 after the opening 1, so it matches as far as 14 and then gives 41 instead of 42.

Follow-up. What does the bracket count look like for n=3n = 3? Five: ((())), (()()), (())(), ()(()) and ()()().

Why it matters. This is one of the cases where a recall of known sequences helps, but the ratios are what prove it. The same counting comes up in valid order-of-operations and stack-permutation questions in coding interviews.

Question 4.30 ★★★ QR, QT, Trader, QD, Dev • market maker, hedge fund • junior, experienced

What is the next number in the sequence 1, 2, 4, 8, 16, 22, 26, 38, 62, 74?

Answer

Answer to Question 4.30.

The next number is 102.

Each term is the previous term plus the product of its non-zero digits. The opening looks like doubling, and it is, because a one-digit number’s product of digits is the number itself. From 16 on: 16+1×6=2216 + 1 \times 6 = 22, 22+2×2=2622 + 2 \times 2 = 26, 26+2×6=3826 + 2 \times 6 = 38, 38+3×8=6238 + 3 \times 8 = 62, 62+6×2=7462 + 6 \times 2 = 74, and 74+7×4=10274 + 7 \times 4 = 102.

The doubling is a decoy. It breaks at 22, and the differences that follow, 6, 4, 12, 24, 12, have a pattern only at the digit level. A step that shrinks and grows like that, on a sequence that is otherwise rising, points to the digits. Having tried the digit sum, which gives 16+7=2316 + 7 = 23 and fails, you try the product next.

Follow-up. Why does the rule say “non-zero”? The next step uses it: from 102, the product of all the digits would be 0 and the sequence would stick. With non-zero digits the step is 2, so the following term is 104.

Classic wrong answer. Fitting a recurrence such as “double, then add a little”. It uses a free number for each step, and so it is no rule at all.