Answer: What Comes Next? #376

The answer is C: 33.

The finished pattern: 3, 7, 13, 17, 23, 27, 33.
The finished pattern.

The rule

Add 4, then add 6, then 4, then 6, and so on. The pattern of adding takes turns.

The pattern as Python code

Here is a tiny Python program that follows the same rule. Type it into IDLE and run it to print the whole pattern, including the answer.

adds = [4, 6]
number = 3
for step in range(7):
    print(number)
    number = number + adds[step % 2]

When you run it, Python prints:

3
7
13
17
23
27
33

Pixel says: Try changing a number in the code and run it again. Can you make the pattern go on for 20 steps? Meow!