Pattern Recognition CS Thinking Example 1

Follow the full solution, then compare it with the other examples linked below.

Example 1

easy
Look at the sequence: 2, 6, 18, 54, ... Identify the pattern and predict the next number.

Solution

  1. 1
    Step 1: Check differences: 6โˆ’2=4, 18โˆ’6=12, 54โˆ’18=36. The differences are not constant.
  2. 2
    Step 2: Check ratios: 6/2=3, 18/6=3, 54/18=3. Each term is multiplied by 3.
  3. 3
    Step 3: Next number: 54ร—3=16254 \times 3 = 162.

Answer

162162. The pattern is multiplying by 3.
Pattern recognition involves identifying regularities and trends. Recognising that a sequence multiplies by a constant factor (geometric sequence) lets us predict future values.

About Pattern Recognition

Pattern recognition is the process of identifying similarities, trends, or regularities across data or problems in order to build general solutions. By spotting what is the same across different cases, you can create reusable strategies instead of solving each case from scratch.

Learn more about Pattern Recognition โ†’

More Pattern Recognition Examples