Number: Prime factor lock
View Sequence overviewAny composite number can be represented as a product of prime factors, including using exponent notation.
Factor strings can be generated, organised, and counted systematically.
A digital tool can be used to test and refine a design, but mathematical decisions still need to be justified.
Whole class
Prime factor lock Slides
Optional: Factor string Python code
Each group
Device with access to Factor lock builder digital interactive
Calculator
Optional: A3 (or larger) poster paper
Build
Divide students into groups of 3–4. Explain that each group is now a phone-security design team. Their task is to create a factor lock that is practical to use while balancing security with the flexibility to create connected swipes on a grid.
Show Slide 16 of Prime factor lock Slides.
Set the challenge:
Design and justify a factor lock for a phone.
Each group must:
- choose a composite lock number less than 1000.
- generate every multi-number factor string for the chosen lock number.
- organise the factor strings by length, keeping factors in ascending order.
- count the number of factor strings of each length and calculate the total number of factor strings.
- choose a square grid from 3 × 3 to 8 × 8.
- fill the grid using whole numbers from 2 to 999 (decoy numbers may be included).
- use the Factor lock builder digital interactive to determine how many of these factor strings are available as connected swipes in the grid.
- justify why the chosen lock number and grid size provide a sensible balance between security and practicality.
Show the Factor lock builder digital interactive. Demonstrate how students can change the lock number, grid size, and the numbers in the grid. Highlight that the tool displays all possible factor strings for the chosen lock number and identifies which can currently be formed as connected swipes on the grid. Explain that the starter layout provides an initial arrangement that students can test and refine to meet their design goals.
Explain that groups may use the tool at any point in their design process to compare lock numbers, test grid sizes and refine their designs.
Remind students that the software can check a design, but the final presentation must show the group’s mathematical reasoning. Their presentation must include an organised record of the factor strings for the chosen number and evidence of how they avoided missing or repeating possibilities.
Groups may revise their lock number, grid size, or grid layout as they test and refine their design.
Encourage groups to use the Factor lock builder digital interactive early in the process, before committing to a lock number or grid design. The tool can help students identify whether a number is suitable, but groups still need to show how they generated and organised the factor strings.
If groups are unsure how to choose a lock number, ask:
- Is the number composite?
- Can you explain how the prime factorisation of this number might affect the number of possible factor strings?
- Will this lock number give you enough flexibility to create connected swipes while keeping the lock secure?
If groups are unsure how to organise factor strings, remind them to:
- write factors in ascending order.
- begin with factor pairs.
- decompose the final factor into two smaller factors.
- group strings by length.
- check that each string has not already been recorded.
Ask:
- Which factor can be decomposed next?
- How will you know whether this string has already appeared?
- How can you organise your work so that another group could check it?
If groups are unsure how to begin the grid design, suggest that they:
- choose a small grid first, then increase its size only if needed.
- place the factors from one intended swipe before adding further values.
- use decoy values to fill remaining spaces.
- test regularly to see which mathematical factor strings are available as connected swipes.
Ask:
- Which factor strings do you want your grid to include?
- Can these factors be placed as one connected swipe?
- Does increasing the grid size improve the design enough to justify making the lock less practical?
Groups that choose a lock number with too many factor strings to organise should return to the Factor lock builder digital interactive, compare alternative numbers and revise their choice before progressing further.
Checkpoint
After groups have selected a provisional lock number and begun organising its factor strings, run a short checkpoint before they commit to a grid layout.
Ask each group to be ready to share:
- their provisional lock number and its prime factorisation.
- how they are organising factor strings to avoid omissions or duplicates.
- one decision they have made about grid size or layout.
- one question or aspect of the design they still need to test.
Select two or three groups with contrasting approaches.
Discuss:
- What evidence suggests that this is a practical lock number?
- How is the group checking that its factor-string list is complete?
- What has the Factor lock builder helped the group test?
- What still needs to be refined or justified?
Give groups time to make any final refinements to their designs.
Invite groups to present their final factor-lock designs, explaining their mathematical reasoning and design decisions.
Discuss:
- How did you decide on your lock number and grid size?
- How many factor strings are possible, and how many can be formed as connected swipes on your grid?
- What changes did you make to improve your design?
- What trade-offs did you make between security and practicality?
- Is there one best factor-lock design? Why or why not?
Draw out that different designs can balance security and practicality in different ways. Mathematical evidence helps designers evaluate their choices, but the best design depends on the criteria they prioritise.
For those that want to further explore the number of factor strings for certain numbers, Factor string Python code provides a short Python program that generates and counts factor strings for any whole number. Copy the code from Factor string Python code into an online compiler such as OnlinePy.
This task can be used as a summative assessment of students’ understanding of prime factorisation, systematic organisation, and computational thinking. Students may report their design as a poster, slide deck, written report, or short pitch. Assess the mathematical evidence rather than the format or visual quality of the final product.
Look for evidence that students can:
- explain the prime factorisation of their chosen lock number, including using exponent notation.
- demonstrate a systematic approach to generating and organising factor strings, avoiding repeated arrangements.
- explain how the prime factorisation influences the number of possible factor strings.
- distinguish between all possible factor strings and those available as connected swipes in their grid.
- use the Factor lock builder to test and refine their design.
- justify their choice of lock number, grid size and placement of values using mathematical evidence, considering both security and practicality.
A strong response will show a clear, complete and organised record of the factor strings, a grid deliberately designed to include selected connected swipes, and a justification that refers to evidence from testing and refinement.
A developing response may identify a suitable composite number and some factor strings, but may omit possibilities, include repeated arrangements, or rely on the Factor lock builder without clearly showing their mathematical process.
Because the task is completed in groups, consider collecting a brief individual reflection or holding a short conference with each student. Ask students to explain how they generated or organised the factor strings, one grid-design decision and one refinement their group made. This provides evidence of each student’s individual understanding.
Use a checkpoint to refine designs

A checkpoint brings students’ interim decisions into public view while those decisions can still be questioned, tested and revised.
In this task, groups may quickly become committed to a lock number or grid layout that proves impractical.
The checkpoint helps shift attention from producing a finished-looking design to examining the mathematical evidence behind it.
Use the checkpoint to surface contrasting approaches rather than identify a single correct design.
For example, one group may have chosen a number with many possible factor strings, while another may be testing whether a smaller grid can provide enough connected swipes. Comparing these approaches helps students clarify the trade-off between security and practicality.
Keep the discussion focused on evidence and next steps:
- What has the group established so far?
- What still needs checking?
- What could be revised?
- What mathematical evidence would make the design more convincing?
A checkpoint should not become a teacher approval stage. Its purpose is to help groups identify their next mathematical decision and retain ownership of the design process.
A checkpoint brings students’ interim decisions into public view while those decisions can still be questioned, tested and revised.
In this task, groups may quickly become committed to a lock number or grid layout that proves impractical.
The checkpoint helps shift attention from producing a finished-looking design to examining the mathematical evidence behind it.
Use the checkpoint to surface contrasting approaches rather than identify a single correct design.
For example, one group may have chosen a number with many possible factor strings, while another may be testing whether a smaller grid can provide enough connected swipes. Comparing these approaches helps students clarify the trade-off between security and practicality.
Keep the discussion focused on evidence and next steps:
- What has the group established so far?
- What still needs checking?
- What could be revised?
- What mathematical evidence would make the design more convincing?
A checkpoint should not become a teacher approval stage. Its purpose is to help groups identify their next mathematical decision and retain ownership of the design process.