Algebra: Pens and patterns
View Sequence overviewGrowing patterns can be described in different ways with step-by-step or relational (direct) rules.
Different rules can represent the same structure when they use the same input and produce the same output.
Whole class
Pens and patterns Slides
Each group
Toothpicks or similar for constructing pens
Modelling clay or blu tack to join toothpicks
Task
Introduce the context of an agricultural show as a way for local farmers to display the best of their craft and animals to their neighbours and those who live in the city. Explain that one of the most difficult things to do when planning for the show is to work out how all the different animals will be housed while on the showgrounds.
Explain that the local agricultural show expected a small number of sheep entries, but many more entries have come in than expected. The organisers now need to work out how many pens and fence panels may be needed, but they cannot build every possible arrangement before ordering materials.
Tell students that their job is to help the organisers test possible pen designs and find efficient ways to work out the number of panels needed.
Show Slide 3 of Pens and patterns Slides to introduce the context of sheep pens.
Ask:
- How many pens might be required?
- How many panels might be needed to build these pens?
- What else might we need to consider?
These broad questions encourage students to think about the planning process: starting with the number of animals, deciding how many pens are needed, and then considering how the arrangement of the pens affects the number of panels required.
Show Slide 4 to demonstrate how the three-dimensional pens can be represented in two dimensions by looking down at the pen from above. Explain that this top-view representation allows each fence panel to be shown as one side of a square.
Divide students into small groups. Provide each group with toothpicks and joining material. As the materials are being distributed, invite students to each build one square pen.
Explain that the local show is setting up sheep pens inside an exhibition hall. Space is limited, and the organisers want to use as few fence panels as possible. However, farmers and judges must be able to access at least two sides of every pen so that the sheep can be safely reached and inspected.
Invite students to work in their groups to design different arrangements of square pens. Pens may share sides to save panels, but every pen must still meet the access rule.
Challenge students to find layouts they think are efficient, then improve them if possible, or explain why they think the layouts are effective. For each layout, students should record the number of pens created and the number of fence panels used, and be ready to explain how they counted them.
Encourage students to try more than one arrangement for the same number of pens and to compare which designs use fewer panels while still meeting the access rule.
As students work, circulate and ask questions such as:
- How do you know each pen has access to at least two sides?
- Where are panels being shared?
- How did sharing panels change the total number needed?
- How are you counting the number of panels?
- Can this layout be improved?
- How are you keeping track of what you have already tested?
Encourage students to record each layout with a quick sketch and the number of panels used.
Look for groups who are doing different things, for example:
- counting every panel one by one.
- starting with separate pens and subtracting shared sides.
- noticing that some arrangements are more efficient than others.
- discussing whether a pen really has two accessible sides.
- trying to arrange pens in a row, block, L-shape or cluster.
These are the strategies you want to bring into the discussion.
At this stage, do not steer students toward a row of connected pens as the “best” solution. The access rule allows other efficient layouts, such as block or L-shaped arrangements. The purpose of this exploration is for students to notice that sharing panels reduces the total number of panels and that different layouts can use different numbers of panels.
Bring the class back together.
Discuss:
- What did you try first?
- What made a layout use fewer panels?
- Did any groups find different layouts for the same number of pens?
- Did any group improve a design after testing it?
Explain that the next step will focus on one layout so the class can investigate how the number of panels changes in a more predictable way.
Explain that the organisers have looked at the different pen layouts. Some layouts use fewer panels than others, but the exhibition hall also needs clear walkways for farmers, judges and visitors.
Tell students that the organisers have allocated the sheep a long narrow space along one side of the exhibition hall. This means the pens need to be arranged in a single row, with access along the front and back of the pens.
Show Slide 5 and explain that the class will now focus on a single row of connected square pens.

Allow each group time to build a row of connected pens and investigate how the number of panels changes as more pens are added. Have students record their thinking in a way that makes sense to them. This might include a drawing, table, diagram, number sentence or written explanation.
Encourage students to begin by using their models to investigate rows of only a small number of pens and identify what changes as the number of pens increases. Encourage them to check their counts carefully and discuss where panels are being shared.
As students’ rows grow longer, pause and explain that the rows are becoming too large to build easily. Challenge students to find a way to work out the number of panels needed for a certain number of pens without modeling the full row each time.
As students investigate arrangements, circulate and ask questions such as:
- How many panels are needed for the first pen?
- What changes when one more pen is added to the row?
- How many new panels are needed each time the row grows?
- Where are the panels being shared?
- How are you keeping track of the number of panels?
- Can you work out the number of panels without counting every panel one by one?
- Would your method still work for a much longer row?
- How could you convince another group that your method works?
Look for students who are:
- counting every panel one by one.
- noticing that the first pen uses four panels and each additional pen adds three panels, describing the pattern as “add 3 each time”.
- counting the top panels, bottom panels and side panels separately.
- starting with separate square pens and subtracting the shared panels.
- attempting to find the number of panels required for a larger number of pens without modelling the full row.
- beginning to explain why their method will continue to work for any row of connected pens.
These strategies can be brought into the following whole-class discussion to show that the same row of pens can be counted in different but equivalent ways.
Bring the class together and ask selected groups to share how they counted the number of panels in a row of connected pens. Choose examples that show different ways of seeing the same structure.
Record some agreed values for small rows on the board, such as:
| Number of pens | 1 | 2 | 3 | 4 | 5 |
| Number of panels | 4 | 7 | 10 | 13 | 16 |
Use a wrong-answer provocation to help students articulate the pattern:
Someone says, “Every new pen needs four more panels because a square pen has four sides.” Is that right?
Ask students to use their models, drawings or table values to respond.
Discuss:
- How many panels does the first pen need?
- What changes when one more pen is added?
- Why does the number of panels increase by three, not four?
- Where is the shared side in the model?
- How could we describe this pattern in words?
The purpose of this discussion is to help students surface the rule from the structure of the build, rather than having the teacher give the rule too quickly.
If students say that each new pen adds three panels, press them to explain why:
- Which panel is already there?
- Which three panels are new?
- Can you show that on the model?
- Does the same thing happen each time another pen is added?
- How could we say that as a rule?
Revoice student responses using precise language. For example:
So, the first pen needs four panels, but each extra pen shares one side with the pen before it. That means each extra pen only needs three new panels.
Record the step-by-step rule in words:
Start with four panels and add three each time another pen is added.
Explain that this is a useful rule because it tells us how the pattern grows from one row to the next.
Show Slide 6 to reinforce this step-by-step rule.
Discuss:
- Would this be a good method for finding the number of panels for six pens?
- What about 10 pens?
- What about 25 pens?
- What about 1000 pens?
The goal here is for students to recognise that “adding three each time” becomes increasingly difficult as the number of pens increases, especially if we do not already know the previous number of panels.
This phase of the lesson is critical to move student thinking from step-by-step rules towards relational rules.
Ask: Would we want to keep adding three each time, or could we find a quicker way?
Explain that a relational rule connects the number of pens directly to the number of panels, without needing to list all the rows before it.
Show Slide 7 and invite students to share different ways of counting the panels in a row. Encourage students to look for a repeated part of the row.
Discuss:
- What parts of the row repeat for every pen?
- Can we find the same number of panels attached to each pen?
- Is there anything that only appears once?
Use the guiding sentence starters to support students articulating a rule and the structural logic behind it:
- The number of panels can be found by...
- This works because...
Support students to express their own rules in words first, for example:
The number of panels can be found by multiplying the number of pens by three, then adding one more panel. This works because each pen can be counted as three panels, with one extra panel at the end of the row.
Slides 8 and 9 include animations that illustrate the structural building of the row. These can be used if students need support to connect their counting strategies to a rule.
Write the different rules generated by students on the board.
Students are not expected to generate formal algebraic notation independently at this stage. Accept drawings, tables, spoken explanations and number sentences. The algebraic expressions below are included to support teachers in connecting student strategies to formal notation when appropriate.
First pen, then extras
Students may say: The first pen uses four panels. Each extra pen adds three panels.
For example, for five pens:
$4 + 3 + 3 + 3 + 3 = 16$
This can later be represented as:
$4 + 3(n-1)$
Three panels for each pen, plus one extra
Students may say: Count three panels for each pen, then add one extra panel at the end.
For example, for five pens:
$3 \times 5 + 1 =16$
This can later be represented as:
$3n + 1$
Top, bottom and vertical panels
Students may say: Count the top row, the bottom row and the vertical panels.
There are $n$ panels along the top, $n$ panels along the bottom, and $n + 1$ vertical panels.
This can later be represented as:
$n + n + (n + 1)$
Separate pens, then shared sides
Students may say: If the pens were separate, each pen would need 4 panels, but connected pens share sides.
If there are $n$ pens, there are $n-1$ shared sides.
This can later be represented as:
$4n - (n - 1)$
Precision of language

Careful teacher language helps students connect their observations to the rules they are developing. As students move from concrete builds to written generalisations, it is important that the words used to describe a rule match the mathematical intent.
Small differences in phrasing can change the meaning of a rule. For example, three times the number of pens minus one corresponds to $3n-1$. But if the intent is to subtract one first, the language needs to reflect that: subtract one from the number of pens, then multiply by three, which corresponds to $3(n-1)$. Although these statements are similar, they describe different sequences of operations and therefore produce different results.
Teachers can support this by making student language visible and open for refinement. Useful strategies include repeating a student’s statement back to the class, asking the student to rephrase it, inviting others to restate it in their own words, and checking whether the spoken rule matches the written expression. These talk moves help students develop precision, test their thinking, and build stronger links between everyday language and the mathematics.
Careful teacher language helps students connect their observations to the rules they are developing. As students move from concrete builds to written generalisations, it is important that the words used to describe a rule match the mathematical intent.
Small differences in phrasing can change the meaning of a rule. For example, three times the number of pens minus one corresponds to $3n-1$. But if the intent is to subtract one first, the language needs to reflect that: subtract one from the number of pens, then multiply by three, which corresponds to $3(n-1)$. Although these statements are similar, they describe different sequences of operations and therefore produce different results.
Teachers can support this by making student language visible and open for refinement. Useful strategies include repeating a student’s statement back to the class, asking the student to rephrase it, inviting others to restate it in their own words, and checking whether the spoken rule matches the written expression. These talk moves help students develop precision, test their thinking, and build stronger links between everyday language and the mathematics.
With the student-generated relational rules written on the board, turn the final part of the discussion to comparing whether the rules produce the same results.
Discuss: Do our different rules produce the same number of panels?
The discussion here focuses on what it means for rules to be “the same”. In this context, the rules need to use the same input (the number of pens) and produce the same output (the number of panels).
Invite students to substitute the same value, or number of pens, into each rule and check whether they produce the same output. You may give different values to different groups, or have all groups test the same set of values and report back.
Emphasise that if rules are the same, they will have the same output for every value, not just one example.
Discuss: Which rule would be easiest to use for a much larger number of pens?
Draw out that multiply the number of pens by three, then add one more panel is useful because it works directly from the number of pens, involves only two steps, and matches the structure of the row where each pen contributes three panels, with one extra panel at the end.
Discuss how this rule will be useful in later tasks because it allows students to calculate the number of panels without drawing, building or listing every previous row.
Showing or proving: What’s the difference?

In this task, students may begin by testing whether different rules agree by substituting the same number of pens into each expression and checking that the number of panels matches. This is a useful strategy for comparing rules, checking calculations, and building confidence in emerging generalisations. However, checking a few examples does not prove that the rules will agree in every case.
A mathematical proof requires reasoning that applies for any number of pens. In this sequence, that reasoning comes from the structure of the build. Students can justify a rule by explaining how each part of the expression corresponds to a feature of the construction.
Useful teacher moves include asking How do you know this will always work?, What does this part of the rule represent in the model?, and Would this still work for any number of pens?. Revoicing students' ideas, pressing for explanation, and linking symbolic expressions back to the physical model can support students to move from checking examples to forming a general argument. In this way, students begin to see that algebraic rules can be justified through structure, not just verified by substitution.
A second source of mathematical proof comes from algebraic equivalence. When two rules are written in different forms, expanding and simplifying can show that they are in fact the same expression. In this way, algebra provides another way to prove that two rules will always give the same result, not just for a few tested values, but for every value.
In this task, students may begin by testing whether different rules agree by substituting the same number of pens into each expression and checking that the number of panels matches. This is a useful strategy for comparing rules, checking calculations, and building confidence in emerging generalisations. However, checking a few examples does not prove that the rules will agree in every case.
A mathematical proof requires reasoning that applies for any number of pens. In this sequence, that reasoning comes from the structure of the build. Students can justify a rule by explaining how each part of the expression corresponds to a feature of the construction.
Useful teacher moves include asking How do you know this will always work?, What does this part of the rule represent in the model?, and Would this still work for any number of pens?. Revoicing students' ideas, pressing for explanation, and linking symbolic expressions back to the physical model can support students to move from checking examples to forming a general argument. In this way, students begin to see that algebraic rules can be justified through structure, not just verified by substitution.
A second source of mathematical proof comes from algebraic equivalence. When two rules are written in different forms, expanding and simplifying can show that they are in fact the same expression. In this way, algebra provides another way to prove that two rules will always give the same result, not just for a few tested values, but for every value.
Discuss the key learning goals from the task.
You might like to have each group discuss what they learned and have one response from each group.
Draw out that students have moved from counting panels one at a time, to noticing how the pattern grows, to creating a direct rule. Emphasise that different rules can represent the same structure when they use the same input and produce the same output.
Reinforce the agreed rule: The number of panels can be found by multiplying the number of pens by three, then adding one more panel.
Show Slide 10 to summarise the intended learning goals.