Lesson 1.5: 1.2 Patterns in Numbers, 1.3 Patterns in Shapes and 1.4 From Patterns to Rules
- View
Chapter 1 · Lesson 5 of 8 · About 14 minutes
Learning objectives Extra Practice
- Construct Pascal's Triangle row by row using the sum‑of‑two‑above rule.
- Identify triangular numbers on the third diagonal of Pascal's Triangle.
- Generate terms of the Virahanka sequence and state its term‑to‑term rule.
- Write both a term‑to‑term rule and a position‑to‑term rule for each pattern.
- Explain how pattern recognition connects to computational thinking.
- Translate a shape pattern into two number sequences.
- Describe the term‑to‑term rule for each sequence.
- Write a position‑to‑term rule and extend the pattern.
- Connect the process to computational thinking.
- Distinguish term‑to‑term and position‑to‑term rules.
- State the term‑to‑term rule for triangular, square, cube, doubling and Virahanka sequences.
- State the position‑to‑term rule for triangular, square, cube and doubling sequences.
- Apply a position‑to‑term rule to find a specific term.
- Explain how a rule lets a computer extend a pattern.
Getting started
In this lesson we explore two famous number patterns: Pascal's Triangle and the Virahanka (Fibonacci) sequence. You will see how triangular numbers appear inside Pascal's Triangle and how each pattern can be described by a simple rule that a computer could follow.
Lesson Extra Practice
Building Pascal's Triangle
Pascal's Triangle starts with a single 1 at the top. Each new row begins and ends with 1. Every interior number is the sum of the two numbers diagonally above it.
- Write 1 as row 0.
- Row 1: 1 1.
- Row 2: 1 (1+1) 1 → 1 2 1.
- Row 3: 1 (1+2) (2+1) 1 → 1 3 3 1.
- Continue the process to obtain as many rows as needed.
| Row | Numbers |
|---|---|
| 0 | 1 |
| 1 | 1 1 |
| 2 | 1 2 1 |
| 3 | 1 3 3 1 |
| 4 | 1 4 6 4 1 |
| 5 | 1 5 10 10 5 1 |
Image prompt 1: section Building Pascal's Triangle

Triangular Numbers Inside Pascal's Triangle
The third diagonal (not the outer 1s, not the counting numbers) contains the triangular numbers: 1, 3, 6, 10, 15, … . These are the same numbers you get by arranging dots in equilateral triangles.
- Row 2, third diagonal → 1 (T₁)
- Row 3, third diagonal → 3 (T₂)
- Row 4, third diagonal → 6 (T₃)
- Row 5, third diagonal → 10 (T₄)
- Row 6, third diagonal → 15 (T₅)
Find the next row and consecutive triangular numbers Extra Practice
Problem: Build the row after 1 5 10 10 5 1. Which two numbers in that new row are consecutive triangular numbers?
Solution:
- Add adjacent pairs of the given row: 1+5=6, 5+10=15, 10+10=20, 10+5=15, 5+1=6.
- Place 1 at each end: 1 6 15 20 15 6 1.
Answer: The new row is 1 6 15 20 15 6 1. The adjacent triangular numbers 6 (T₃) and 15 (T₅) appear consecutively in this row.
The Virahanka (Fibonacci) Sequence
The Virahanka sequence begins 1, 1, 2, 3, 5, 8, 13, 21. Each term after the first two is the sum of the two preceding terms.
- Term‑to‑term rule: add the previous two terms to get the next term.
- Position‑to‑term rule (for term n ≥ 3): Tₙ = Tₙ₋₁ + Tₙ₋₂ with T₁ = 1, T₂ = 1.
Extend the Virahanka sequence Extra Practice
Problem: What are the next two terms after 21?
Solution:
- 13 + 21 = 34
- 21 + 34 = 55
Answer: The next two terms are 34 and 55.
Image prompt 2: section The Virahanka (Fibonacci) Sequence

From Patterns to Computational Thinking
Recognising a pattern, stating its rule, and using the rule to predict further terms mirrors the four‑step process used in computer science: Observe, Identify, Predict, Verify. A program that learns to spot a cat in photos follows the same logic.
- Observe the numbers or shapes.
- Identify the rule (term‑to‑term or position‑to‑term).
- Predict the next terms or rows.
- Verify by checking against the construction method.
From Shapes to Numbers
Term 1 shows 1 hexagon above 2 diamonds. Term 2 shows 2 hexagons above 3 diamonds. Term 3 shows 3 hexagons above 4 diamonds.
- Hexagons: 1, 2, 3, … (counting numbers)
- Diamonds: 2, 3, 4, … (always one more than hexagons)
- Each term adds one hexagon and one diamond.
| Term | Hexagons | Diamonds |
|---|---|---|
| 1 | 1 | 2 |
| 2 | 2 | 3 |
| 3 | 3 | 4 |
| 4 | 4 | 5 |
Image prompt 3: Section 'From Shapes to Numbers' after the table

Finding the Rule
Observe the two sequences side by side. The hexagon sequence follows the position number n. The diamond sequence is n + 1.
- List the term number n.
- Hexagons = n.
- Diamonds = n + 1.
- Check with the table.
Term 10 Extra Practice
Problem: How many hexagons and diamonds are in term 10?
Solution:
- Hexagons = 10.
- Diamonds = 10 + 1 = 11.
Answer: 10 hexagons, 11 diamonds
Extending the Pattern
Using the position‑to‑term rules you can jump to any term without drawing all previous ones.
- Term 100 → 100 hexagons, 101 diamonds
- Term 1000 → 1000 hexagons, 1001 diamonds
- Rule works for any positive integer n.
| Term | Hexagons | Diamonds |
|---|---|---|
| 100 | 100 | 101 |
| 1000 | 1000 | 1001 |
Image prompt 4: Section 'Extending the Pattern' after the large‑term table

Patterns and Computational Thinking
Turning pictures into numbers is exactly what a computer does when it learns to recognise patterns in data.
- Observe → Identify → Predict → Verify
- Same four‑step process used in AI training
- Simple rules let machines handle huge data sets.
Term‑to‑Term Rules
A term‑to‑term rule tells how to get from one term to the next. For triangular numbers we add one more than the previous addition. For the doubling pattern we multiply the previous term by two.
- Triangular numbers: add one more than the previous addition.
- Doubling pattern: multiply the previous term by 2.
Image prompt 5: section Term‑to‑Term Rules after bullet list

Position‑to‑Term Rules
A position‑to‑term rule lets us jump straight to any term using its position n. For square numbers the rule is n × n; for cube numbers n × n × n; for doubling 2^(n‑1); for triangular numbers n × (n + 1) ÷ 2.
- Square numbers: n × n
- Cube numbers: n × n × n
- Doubling pattern: 2^(n‑1)
- Triangular numbers: n × (n + 1) ÷ 2
| Sequence | Term‑to‑Term Rule | Position‑to‑Term Rule |
|---|---|---|
| Triangular Numbers | Add one more than the previous addition | n × (n + 1) ÷ 2 |
| Square Numbers | Add the next odd number (the gnomon) | n × n |
| Cube Numbers | Grows in three directions at once | n × n × n |
| Doubling Pattern | Multiply the previous term by 2 | 2^(n‑1) |
| Virahanka Numbers | Add the two previous terms | No simple one‑line rule for Class 6 |
Image prompt 6: section Position‑to‑Term Rules after table

Worked Example
Finding the 12th and 100th square numbers Extra Practice
Problem: Use the position‑to‑term rule for square numbers (n × n) to find the 12th and 100th terms.
Solution:
- Identify n = 12. Compute 12 × 12 = 144.
- Identify n = 100. Compute 100 × 100 = 10 000.
Answer: 12th square = 144; 100th square = 10 000
Practice
- Calculate the 12th square number using n × n.
- Calculate the 100th square number using n × n.
- Calculate the 10th triangular number using n × (n + 1) ÷ 2.
- Calculate the 5th cube number using n × n × n.
Teacher–student conversation Extra Practice
Teacher: Look at row 5 of Pascal's Triangle. Which diagonal gives the triangular numbers?
Student: The third diagonal, starting with 1 in row 2.
Teacher: Correct. Now write the term‑to‑term rule for the Virahanka sequence.
Teacher: If we continue Pascal's Triangle two more rows, what triangular numbers will appear on the third diagonal?
Student: Row 6 gives 15, row 7 gives 21.
Teacher: Exactly. Those are T₅ and T₆.
Teacher: What do you notice about the diamond numbers compared to the hexagon numbers?
Student: Each diamond count is one more than the hexagon count.
Teacher: Exactly. Can you write that as a rule using the term number n?
Teacher: What is the term‑to‑term rule for the doubling pattern?
Student: Multiply the previous term by two.
Teacher: Correct. Now, if the first term is 1, what is the fourth term?
Real-world connections Extra Practice
- Pascal's Triangle coefficients appear in binomial expansions used in probability and genetics.
- The Virahanka sequence models population growth, spirals in sunflowers, and algorithmic recursion.
- Tile designs on floors follow repeating shape rules.
- Computer vision converts images to numeric patterns for object detection.
- Music rhythms can be described by number sequences.
- Computer algorithms use position‑to‑term rules to generate sequences quickly.
- Architects use square‑number rules when designing tiled floors.
- Biologists model population growth with doubling rules.
Build Pascal's Triangle with Counters Extra Practice
- Place one counter for the top 1.
- For each new row, put a counter at each end.
- For interior positions, place a number of counters equal to the sum of the two counters diagonally above.
- Record the first eight rows on paper and highlight the third diagonal.
Materials: Counters or beans, grid paper, pencils.
Build Your Own Shape Pattern Extra Practice
- Draw three terms using two different shapes.
- Count each shape per term and record in a table.
- Write the term‑to‑term and position‑to‑term rules.
Materials: Graph paper, coloured pencils, ruler
Build Your Own Pattern Chart Extra Practice
- Draw a table with columns: Sequence, Term‑to‑Term Rule, Position‑to‑Term Rule.
- Fill in the five sequences from the lesson.
- Choose a new n (e.g., 7) and compute the term for each sequence using the position‑to‑term rule.
- Share your chart with a partner and verify each other's answers.
Materials: Paper, pencil, ruler
Important points to remember Extra Practice
- Pascal's Triangle is built by summing two numbers above; edges are always 1.
- Triangular numbers appear on the third diagonal of Pascal's Triangle.
- The Virahanka sequence follows the rule Tₙ = Tₙ₋₁ + Tₙ₋₂.
- Both patterns can be described with term‑to‑term and position‑to‑term rules.
- Pattern recognition is a core skill in computational thinking and AI.
- Shape patterns can be translated into number sequences.
- Hexagons follow n; diamonds follow n + 1.
- Position‑to‑term rules let you jump to any term.
- The four‑step pattern process mirrors computational thinking.
- Recognising patterns is a core skill in mathematics and AI.
- Term‑to‑term rules describe step‑by‑step growth.
- Position‑to‑term rules give a direct formula using n.
- Square numbers follow n × n; triangular numbers follow n(n+1)/2.
- A clear rule lets anyone — or a computer — extend the pattern without listing all terms.
Lesson summary Extra Practice
You have constructed Pascal's Triangle, discovered triangular numbers hidden inside it, extended the Virahanka sequence, and written clear rules for each pattern. These skills form the foundation for recognizing structure in data — a key idea in mathematics and computer science.
You learned to convert a visual pattern of hexagons and diamonds into two simple number patterns, discovered the rules hexagons = n and diamonds = n + 1, and used those rules to predict terms far beyond the ones drawn. This translation from pictures to numbers is the foundation of pattern recognition in both mathematics and computer science.
We compared two ways to describe patterns: term‑to‑term and position‑to‑term. The position‑to‑term rule is more powerful because it lets us jump to any term instantly, as shown with square, triangular, cube and doubling sequences.
Illustrations retained from the textbook From Your Textbook
Fig. 1.10: The first six rows of Pascal's Triangle, with the triangular numbers 1, 3, 6, 10 highlighted along a diagonal From Your Textbook
Symmetric triangle of circled numbers, six rows, light-blue circles with navy numerals, gold-filled circles with white numerals marking the triangular-number diagonal
Fig. 1.11: A shape pattern: the number of diamonds is always one more than the number of hexagons From Your Textbook
Three-panel illustration, grey hexagons in a row above gold diamonds in a row, term label and shape-count caption above each panel
Figure 1.83: Illustration from the textbook From Your Textbook

Teacher review note
The source text provides all factual content needed for this lesson. No additional information was invented.
AI-generated learning material based on the uploaded source. Please review explanations, examples and assessments before assigning this lesson to students.