Home / Reasoning / Find the Rule: Number Patterns and Loops
Reasoning & Coding · Patterns
Find the Rule: Number Patterns and Loops
Find the rule in a number pattern, predict later terms, tell add from multiply, trace a loop that builds a pattern and debug a program that goes wrong.
The idea
A pattern is a list of numbers that follows a rule. If you can name the rule, you can predict any term, even a term far away, without writing all the earlier ones.
Start by finding the change from one term to the next. Subtract each term from the one after it. If the changes are all the same (5, 5, 5), the rule is add that number. If the numbers keep doubling or tripling (2, 4, 8, 16), the rule is to multiply. If the changes grow by the same amount (2, 4, 6, 8), the pattern is growing, as in 3, 5, 9, 15, 23.
Always test the rule on every pair of terms, not just the first two. A rule that works for 2 and 4 might not work for 8. Write the rule as a sentence: “Start at 4 and add 3 each time.”
A loop in a program repeats the same steps. “x = 3, repeat 4 times: x = x + 5” makes 8, 13, 18, 23. To trace it, write x after every repeat in a small table. Do not skip a repeat in your head.
When a program gives the wrong pattern, test it on the first repeat. Look at the order of steps. Saying a number before you change it prints the old value.
Patterns are everywhere: seats in rows, steps in a staircase, bus times, and sticks in a growing shape. Naming the rule helps you check whether an answer is reasonable.
Worked examples
Example 1 · Find the rule
What is the rule for 4, 9, 14, 19? What comes next?
- 9 − 4 = 5, 14 − 9 = 5, 19 − 14 = 5.
- The changes are all 5, so the rule is add 5.
- 19 + 5 = 24.
Add 5; the next term is 24.
Example 2 · Multiply, not add
What comes next? 3, 6, 12, 24
- The changes are 3, 6, 12, which are not equal, so it is not an add rule.
- 6 ÷ 3 = 2, 12 ÷ 6 = 2, 24 ÷ 12 = 2.
- Multiply by 2: 24 × 2 = 48.
48
Example 3 · Growing gaps
What comes next? 1, 2, 4, 7, 11
- The gaps are 1, 2, 3, 4.
- The next gap is 5.
- 11 + 5 = 16.
16
Example 4 · Trace a loop
x = 2. Repeat 3 times: x = x × 2 + 1. What is x at the end?
- After repeat 1: 2 × 2 + 1 = 5.
- After repeat 2: 5 × 2 + 1 = 11.
- After repeat 3: 11 × 2 + 1 = 23.
23
Example 5 · Debug
A program should say 3, 6, 9. It runs x = 0, repeat 3 [say x, x = x + 3] and says 0, 3, 6. Find the bug.
- It says x before adding.
- So the first number said is the starting value, 0.
- Fix: add first, then say x.
Swap the order: x = x + 3, then say x.
Common mistakes
Why this fails: 2, 4, 8 could be add 2 or double. Test the rule on every pair.
Why this fails: If the changes keep growing, check whether you multiply, or whether the gaps themselves follow a pattern.
Why this fails: Write x after every repeat. One missing repeat changes the final value.
Why this fails: After 4 repeats of adding 5, x is the start plus 20, not 20.
Why this fails: The 7th term is the seventh number in the list, not seven steps from the start. The 7th term is 6 steps after the 1st.
Why this fails: Saying a number before changing it says the old value. Order matters in a program.
Foundation
Foundation practice
Name the rule and find the next term.
1. What number comes next? 5, 10, 15, 20, ___
- 24
- 30
- 21
- 25
2. What number comes next? 100, 90, 80, 70, ___
- 60
- 50
- 65
- 71
3. What number comes next? 2, 4, 8, 16, ___
- 24
- 20
- 32
- 18
4. What is the rule for 7, 11, 15, 19?
- multiply by 2
- add 7
- add 4
- subtract 4
5. Which number does NOT belong in the pattern 3, 6, 9, 13, 15?
- 13
- 9
- 15
- 6
6. What number comes next? 1, 4, 9, 16, ___
- 20
- 24
- 32
- 25
7. The pattern is 50, 45, 40, 35, ... What is the 7th term?
- 15
- 20
- 25
- 30
8. A pattern starts at 4 and adds 3 each time. Which list shows the first four terms?
- 3, 6, 9, 12
- 4, 7, 10, 13
- 4, 8, 12, 16
- 7, 10, 13, 16
Practice
Practice practice
Use two-step rules, growing patterns and loops.
9. The rule is: multiply by 2, then add 1. What comes next? 2, 5, 11, 23, ___
- 35
- 46
- 44
- 47
10. In 1, 1, 2, 3, 5, 8, each term is the sum of the two before it. What comes next?
- 13
- 11
- 12
- 16
11. The pattern is 3, 6, 12, 24, ... (multiply by 2). What is the 6th term?
- 48
- 72
- 96
- 192
12. A program starts with x = 3. It repeats 4 times: x = x + 5. What is x at the end?
- 20
- 28
- 23
- 8
13. x = 2. Repeat 3 times: x = x × 3. What is x at the end?
- 54
- 18
- 27
- 8
14. x = 3. Repeat 3 times: [x = x × 2, then x = x − 1]. What is x at the end?
- 15
- 18
- 24
- 17
15. One triangle made of matchsticks uses 3 sticks. Two triangles in a row use 5 sticks and three use 7. How many sticks do 10 triangles in a row use?
- 30
- 21
- 23
- 19
16. What comes next? 1, 10, 2, 20, 3, 30, ___
- 40
- 4
- 31
- 6
17. n = 1, 2, 3, 4 gives 4, 7, 10, 13. What is the value when n = 10?
- 34
- 40
- 30
- 31
Challenge
Challenge practice
Debug, compare and test patterns.
18. The pattern should add 4: 4, 8, 12, 16, 21. Which term is wrong?
- 21
- 16
- 12
- 8
19. Which rule fits 2, 6, 18, 54?
- add 4
- add 12
- multiply by 3
- multiply by 2
20. 6, ___, 24, 48. What is the missing term?
- 9
- 15
- 12
- 18
21. What comes next? 3, 5, 9, 15, 23, ___
- 33
- 31
- 29
- 35
22. The goal is to say 5, 10, 15, 20. The program is: x = 0, repeat 4 times [say x, then x = x + 5]. What does it say?
- 5, 10, 15, 20
- 5, 10, 15
- 0, 5, 10, 15, 20
- 0, 5, 10, 15
23. How many terms are in the list 7, 14, 21, ..., 105?
- 14
- 15
- 16
- 105
24. Pattern A starts at 5 and adds 3. Pattern B starts at 20 and subtracts 2. Which term number is the first where A is greater than B?
- 4th
- 5th
- 3rd
- 6th
Answer key
- 1. 25
The rule is add 5 each time, so 20 + 5 = 25. 30 skips a term, 24 and 21 do not follow the pattern of adding 5. - 2. 60
The rule is subtract 10 each time. 70 − 10 = 60. 50 skips a term and the other choices do not keep the steps equal. - 3. 32
The rule is multiply by 2: 16 × 2 = 32. Choosing 24 or 20 treats the pattern as adding, but the gaps are 2, 4, 8 and keep doubling. - 4. add 4
11 − 7 = 4, 15 − 11 = 4 and 19 − 15 = 4, so the rule is add 4. Multiplying by 2 would give 14 after 7. Adding 7 would give 14 and subtracting 4 makes the numbers smaller. - 5. 13
The pattern counts by 3: 3, 6, 9, 12, 15. The number 13 breaks the pattern, because the fourth term should be 12. - 6. 25
These are square numbers: 1×1, 2×2, 3×3, 4×4, so the next is 5×5 = 25. The gaps are 3, 5, 7, so the next gap is 9: 16 + 9 = 25. Adding 4 each time would give 20, which ignores the growing gaps. - 7. 20
Subtract 5 each time: 50, 45, 40, 35, 30, 25, 20. The 7th term is 20. 25 is the 6th term, and 15 is the 8th. - 8. 4, 7, 10, 13
Start at 4 and add 3: 4, 7, 10, 13. 3, 6, 9, 12 starts at 3, 4, 8, 12, 16 adds 4, and 7, 10, 13, 16 leaves out the starting number. - 9. 47
Check the rule: 2×2+1 = 5, 5×2+1 = 11, 11×2+1 = 23, so 23×2+1 = 47. 46 forgets the +1 and 35 adds 12, which does not fit. - 10. 13
5 + 8 = 13. 11 and 12 come from adding 3 or 4, and 16 doubles 8. Each of these ignores the rule of adding the two previous terms. - 11. 96
3, 6, 12, 24, 48, 96. The 5th term is 48 and the 6th is 96. 72 comes from adding 24 three times instead of doubling. - 12. 23
Each repeat adds 5, so 4 repeats add 20. 3 + 20 = 23. 20 forgets the starting 3, 28 adds five times and 8 is only one repeat. - 13. 54
2 → 6 → 18 → 54. After one repeat x is 6, after two it is 18 and after three it is 54. 27 is 3 × 3 × 3 and 8 is 2 × 2 × 2, so they use the wrong operation or the wrong start. - 14. 17
3 → 6 → 5, then 5 → 10 → 9, then 9 → 18 → 17. The final value is 17. 18 and 24 skip the subtract step in some repeats. - 15. 21
Each new triangle adds 2 sticks, and the first one needs 3. For n triangles the count is 2 × n + 1, so for 10 it is 21. 30 treats every triangle as new with 3 sticks, ignoring shared sticks. - 16. 4
Two patterns are mixed: 1, 2, 3, 4 in the odd places and 10, 20, 30, 40 in the even places. The next term is in an odd place, so it is 4. - 17. 31
The rule is 3 × n + 1: 3×1+1 = 4, 3×4+1 = 13. For n = 10, 3×10+1 = 31. 40 is 4 × 10 and 30 forgets the +1. - 18. 21
After 16 the next term should be 20, not 21. The first four terms follow the add-4 rule. - 19. multiply by 3
2 × 3 = 6, 6 × 3 = 18, 18 × 3 = 54. Adding 4 or 12 does not match all the gaps, and doubling 2 would give 4. - 20. 12
The pattern doubles: 24 × 2 = 48 and 12 × 2 = 24, so the missing term is 12 (6 × 2). 9, 15 and 18 give a different gap and the pattern would stop doubling. - 21. 33
The gaps are 2, 4, 6, 8, so the next gap is 10: 23 + 10 = 33. 31 uses a gap of 8 again. - 22. 0, 5, 10, 15
x starts at 0 and the program says x before it adds, so it says 0, 5, 10, 15. The fix is to add 5 first and then say x, or to start x at 5. - 23. 15
The nth term is 7 × n, and 105 ÷ 7 = 15, so there are 15 terms. 14 forgets the last term, and 16 counts a term after 105. - 24. 5th
A: 5, 8, 11, 14, 17. B: 20, 18, 16, 14, 12. At the 4th term both are 14. At the 5th term A = 17 and B = 12, so A is greater for the first time. The 4th term is a tie.