Study CommonsRead · reason · practise

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.

Learning objectiveName the rule in a number pattern (add, subtract, multiply or two steps), predict a later term, spot the term that breaks a pattern, and trace a loop that builds a pattern step by step.

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?

  1. 9 − 4 = 5, 14 − 9 = 5, 19 − 14 = 5.
  2. The changes are all 5, so the rule is add 5.
  3. 19 + 5 = 24.

Add 5; the next term is 24.

Example 2 · Multiply, not add

What comes next? 3, 6, 12, 24

  1. The changes are 3, 6, 12, which are not equal, so it is not an add rule.
  2. 6 ÷ 3 = 2, 12 ÷ 6 = 2, 24 ÷ 12 = 2.
  3. Multiply by 2: 24 × 2 = 48.

48

Example 3 · Growing gaps

What comes next? 1, 2, 4, 7, 11

  1. The gaps are 1, 2, 3, 4.
  2. The next gap is 5.
  3. 11 + 5 = 16.

16

Example 4 · Trace a loop

x = 2. Repeat 3 times: x = x × 2 + 1. What is x at the end?

  1. After repeat 1: 2 × 2 + 1 = 5.
  2. After repeat 2: 5 × 2 + 1 = 11.
  3. 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.

  1. It says x before adding.
  2. So the first number said is the starting value, 0.
  3. Fix: add first, then say x.

Swap the order: x = x + 3, then say x.

Common mistakes

Checking only the first two terms.

Why this fails: 2, 4, 8 could be add 2 or double. Test the rule on every pair.

Adding when the pattern multiplies.

Why this fails: If the changes keep growing, check whether you multiply, or whether the gaps themselves follow a pattern.

Skipping repeats when tracing a loop.

Why this fails: Write x after every repeat. One missing repeat changes the final value.

Forgetting the starting value.

Why this fails: After 4 repeats of adding 5, x is the start plus 20, not 20.

Counting terms wrongly.

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.

Getting steps in the wrong order.

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.

Next term

1. What number comes next? 5, 10, 15, 20, ___

  1. 24
  2. 30
  3. 21
  4. 25
Next term

2. What number comes next? 100, 90, 80, 70, ___

  1. 60
  2. 50
  3. 65
  4. 71
Next term

3. What number comes next? 2, 4, 8, 16, ___

  1. 24
  2. 20
  3. 32
  4. 18
Name the rule

4. What is the rule for 7, 11, 15, 19?

  1. multiply by 2
  2. add 7
  3. add 4
  4. subtract 4
Odd one out

5. Which number does NOT belong in the pattern 3, 6, 9, 13, 15?

  1. 13
  2. 9
  3. 15
  4. 6
Square numbers

6. What number comes next? 1, 4, 9, 16, ___

  1. 20
  2. 24
  3. 32
  4. 25
Later term

7. The pattern is 50, 45, 40, 35, ... What is the 7th term?

  1. 15
  2. 20
  3. 25
  4. 30
Start and rule

8. A pattern starts at 4 and adds 3 each time. Which list shows the first four terms?

  1. 3, 6, 9, 12
  2. 4, 7, 10, 13
  3. 4, 8, 12, 16
  4. 7, 10, 13, 16

Practice

Practice practice

Use two-step rules, growing patterns and loops.

Two-step rule

9. The rule is: multiply by 2, then add 1. What comes next? 2, 5, 11, 23, ___

  1. 35
  2. 46
  3. 44
  4. 47
Special pattern

10. In 1, 1, 2, 3, 5, 8, each term is the sum of the two before it. What comes next?

  1. 13
  2. 11
  3. 12
  4. 16
Later term

11. The pattern is 3, 6, 12, 24, ... (multiply by 2). What is the 6th term?

  1. 48
  2. 72
  3. 96
  4. 192
Trace a program

12. A program starts with x = 3. It repeats 4 times: x = x + 5. What is x at the end?

  1. 20
  2. 28
  3. 23
  4. 8
Trace a program

13. x = 2. Repeat 3 times: x = x × 3. What is x at the end?

  1. 54
  2. 18
  3. 27
  4. 8
Two steps in a loop

14. x = 3. Repeat 3 times: [x = x × 2, then x = x − 1]. What is x at the end?

  1. 15
  2. 18
  3. 24
  4. 17
Growing pattern

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?

  1. 30
  2. 21
  3. 23
  4. 19
Alternating pattern

16. What comes next? 1, 10, 2, 20, 3, 30, ___

  1. 40
  2. 4
  3. 31
  4. 6
Rule from a table

17. n = 1, 2, 3, 4 gives 4, 7, 10, 13. What is the value when n = 10?

  1. 34
  2. 40
  3. 30
  4. 31

Challenge

Challenge practice

Debug, compare and test patterns.

Find the error

18. The pattern should add 4: 4, 8, 12, 16, 21. Which term is wrong?

  1. 21
  2. 16
  3. 12
  4. 8
Name the rule

19. Which rule fits 2, 6, 18, 54?

  1. add 4
  2. add 12
  3. multiply by 3
  4. multiply by 2
Missing term

20. 6, ___, 24, 48. What is the missing term?

  1. 9
  2. 15
  3. 12
  4. 18
Growing gaps

21. What comes next? 3, 5, 9, 15, 23, ___

  1. 33
  2. 31
  3. 29
  4. 35
Debug the program

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?

  1. 5, 10, 15, 20
  2. 5, 10, 15
  3. 0, 5, 10, 15, 20
  4. 0, 5, 10, 15
Count the terms

23. How many terms are in the list 7, 14, 21, ..., 105?

  1. 14
  2. 15
  3. 16
  4. 105
Compare two patterns

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?

  1. 4th
  2. 5th
  3. 3rd
  4. 6th

Answer key

  1. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 18. 21
    After 16 the next term should be 20, not 21. The first four terms follow the add-4 rule.
  19. 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. 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. 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. 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. 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. 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.

Related practice