Year 6Mathematics 60 minAC9M6A03: create and use algorithms involving a sequence of steps and decisions that use rules to generate sets of numbers; identify, interpret and explain emerging patterns
We are learning to
- We are learning to follow and create algorithms that include decisions.
- We are learning to find and explain patterns in the numbers an algorithm makes.
Success criteria: I can…
- I can follow a flowchart one step at a time, making the right decision at each diamond.
- I can record the sequence an algorithm makes and count its steps.
- I can describe a pattern in the results and explain why it happens.
- I can create an algorithm with a decision and test it.
Key competenciesNumeracyCritical and Creative ThinkingDigital Literacy
Lesson sequence
60 min total- 1
Run the flowchart
Starter 0–8 minTeacher- Draw the Algorithm A flowchart on the board (resources).
- Say: “An algorithm is a list of steps. This one has decisions in diamonds. Every time we reach a diamond, we answer yes or no and follow that arrow.”
- Run it together from 6, writing each number:
- 6 is even, so halve: 3. 3 is odd, so 3 × 3 + 1 = 10. Then 5, 16, 8, 4, 2, 1. Stop.
- Ask: How many steps did it take to reach 1? (8: 3, 10, 5, 16, 8, 4, 2, 1)
- Ask: What was the biggest number we reached? (16)
- Ask: Which decision would we never need if we started at 8? (the "No" branch of "Is the number even?", multiply by 3 and add 1: 8, 4, 2, 1 are all reached by halving)
Students- Follow the flowchart from 6 with the teacher.
- Count the steps and find the biggest number in the sequence.
Algorithm A flowchart (in resources), drawn on the board - 2
Algorithm A: test 1 to 20
Main 8–28 minTeacher- Put students in groups of four. Give each group four or five start numbers so that the class covers 1 to 20.
- Say: “Run Algorithm A for each of your numbers. Write the full sequence, count the steps to reach 1 and circle the biggest number. Check each other's work: one slip changes the whole sequence.”
- Groups add their results to the class table on the board (answers in resources).
- Ask: Which start numbers reached 1 fastest? What do they have in common? (1, 2, 4, 8 and 16: you can keep halving them all the way to 1)
- Ask: How does every sequence end? (with 4, 2, 1 for every start number from 4 up; most go through 16, 8, 4, 2, 1)
- Ask: Which start numbers took the most steps? (18 and 19, with 20 steps each)
- Ask: Does a bigger start number always take more steps? (no: 16 takes 4 steps but 7 takes 16)
- Say: “Start at 27 and it takes 111 steps and climbs as high as 9232 before it gets to 1. Mathematicians have checked enormous numbers of start numbers and every one has reached 1, but nobody has proved it must always happen. That is a famous unsolved conjecture.”
Students- Run the algorithm for the group's start numbers and check each other's sequences.
- Add results to the class table.
- Describe patterns in the steps and endings, and test a claim against the data.
Mini whiteboards or scrap paper Class results table on the board (Start number, Sequence, Steps to reach 1, Biggest number) - 3
Algorithm B: two loops
Main 28–45 minTeacher- Show the Algorithm B flowchart (resources): if even, halve; if odd, add 5; stop when a number repeats.
- Run it from 7 together: 7, 12, 6, 3, 8, 4, 2, 1, 6. Stop, because 6 repeats.
- Say: “Your group runs your same start numbers through Algorithm B. Write each sequence and the loop it ends in.”
- Ask: How many different loops did the class find? (two: 6, 3, 8, 4, 2, 1 and 5, 10)
- Ask: Which start numbers ended in the 5, 10 loop? (5, 10, 15 and 20)
- Ask: Make a conjecture. (start numbers that are multiples of 5 end in the 5, 10 loop; all others end in the other loop)
- Ask: Why does a multiple of 5 stay a multiple of 5? (adding 5 to a multiple of 5 gives another multiple of 5, and halving an even multiple of 5 such as 20 gives a multiple of 5, 10)
- Ask: Test the conjecture on 35 and on 23. (35, 40, 20, 10, 5, 10: the 5, 10 loop; 23 is in the exit ticket)
- Optional with devices: put a start number in cell A1 of a spreadsheet and the formula =IF(MOD(A1,2)=0,A1/2,A1+5) in A2, then fill down to see the sequence appear.
Students- Run Algorithm B for the group's start numbers.
- Find the two loops and make a conjecture about which start numbers go to each.
- Explain why the multiples of 5 stay multiples of 5.
- Optional: build the algorithm in a spreadsheet.
Algorithm B flowchart (in resources) Optional: laptops or tablets with a spreadsheet program - 4
Make your own and exit ticket
Plenary 45–60 minTeacher- Say: “Write your own algorithm with one decision. For example: if the number is less than 50, double it; otherwise subtract 30. Draw it as a flowchart, then give it to a partner to run from a start number you choose.”
- Partners run each other's algorithm and say what pattern they see (a loop, numbers growing forever, or reaching a stop).
- Then students answer alone.
- Questions
- 1.Run Algorithm B from 23. Write the sequence until a number repeats. (23, 28, 14, 7, 12, 6, 3, 8, 4, 2, 1, 6)
- 2.Which loop did 23 end in? Does this fit the class conjecture? Explain. (the 6, 3, 8, 4, 2, 1 loop; yes, 23 is not a multiple of 5)
- 3.Run Algorithm A from 12. How many steps to reach 1? (9: 6, 3, 10, 5, 16, 8, 4, 2, 1)
Students- Create a flowchart algorithm with a decision and test a partner's.
- Complete the three exit questions.
Exit ticket slips
Key vocabulary
algorithm
a precise set of steps, in order, for solving a problem or making something
flowchart
a diagram of an algorithm: rectangles for steps, diamonds for yes/no decisions, arrows for order
decision
a question with a yes or no answer that decides which step comes next
sequence
a list of numbers in order
loop
a part of a sequence that repeats forever
conjecture
a statement we think is true but haven't proved yet
Differentiation
Support
- Give start numbers 1, 2, 4, 8 and 16 for Algorithm A first, so students see the halving pattern, then add 3 and 5.
- Provide a flowchart with the decisions already filled in for each number, and a hundreds chart to find the next number.
- Allow a calculator for 3 × the number + 1.
Extension
- Ask: "In Algorithm A, which start number from 1 to 20 reaches the biggest number?" (15, which climbs to 160)
- Ask: "Run the make-your-own example from 7: if less than 50, double it; otherwise subtract 30. What happens?" (7, 14, 28, 56, 26, 52, 22, 44, 88, 58, 28: it falls into a loop of eight numbers starting at 28)
- Ask: "Change Algorithm B to: if even, halve; if odd, add 3. Which loops appear for 1 to 12?" (multiples of 3 end in the loop 3, 6; the others end in the loop 1, 4, 2)
Accessibility
- Give a printed copy of each flowchart with large text.
- Let students track each number by moving a counter along the flowchart as they say each decision aloud.
- For EAL/D learners, pre-teach even, odd, halve and repeat, with a quick example of each.
Assessment
- Observe groups: do students make the correct decision at each diamond and record complete sequences?
- Class table: every sequence and step count matches the answers in resources.
- Exit ticket: correct sequence from 23, a link to the multiple of 5 conjecture, and 9 steps for 12.
Resources
- Algorithm A flowchart: START: choose a whole number. Diamond 1: Is the number 1? Yes: STOP. No: go to diamond 2. Diamond 2: Is the number even? Yes: halve it. No: multiply it by 3 and add 1. Write the new number, then go back to diamond 1.
- Algorithm B flowchart: START: choose a whole number. Diamond 1: Has this number appeared before in my sequence? Yes: STOP. No: go to diamond 2. Diamond 2: Is the number even? Yes: halve it. No: add 5. Write the new number, then go back to diamond 1.
- Algorithm A answers (start number: sequence; steps to reach 1; biggest number): 1: 1; 0; 1. 2: 2, 1; 1; 2. 3: 3, 10, 5, 16, 8, 4, 2, 1; 7; 16. 4: 4, 2, 1; 2; 4. 5: 5, 16, 8, 4, 2, 1; 5; 16. 6: 6, 3, 10, 5, 16, 8, 4, 2, 1; 8; 16. 7: 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1; 16; 52. 8: 8, 4, 2, 1; 3; 8. 9: 9, 28, 14, 7, then as for 7; 19; 52. 10: 10, 5, 16, 8, 4, 2, 1; 6; 16. 11: 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1; 14; 52. 12: 12, 6, then as for 6; 9; 16. 13: 13, 40, 20, 10, 5, 16, 8, 4, 2, 1; 9; 40. 14: 14, 7, then as for 7; 17; 52. 15: 15, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1; 17; 160. 16: 16, 8, 4, 2, 1; 4; 16. 17: 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1; 12; 52. 18: 18, 9, then as for 9; 20; 52. 19: 19, 58, 29, 88, 44, 22, 11, then as for 11; 20; 88. 20: 20, 10, 5, 16, 8, 4, 2, 1; 7; 20.
- Algorithm B answers (start number: sequence until a number repeats): 1: 1, 6, 3, 8, 4, 2, 1. 2: 2, 1, 6, 3, 8, 4, 2. 3: 3, 8, 4, 2, 1, 6, 3. 4: 4, 2, 1, 6, 3, 8, 4. 5: 5, 10, 5. 6: 6, 3, 8, 4, 2, 1, 6. 7: 7, 12, 6, 3, 8, 4, 2, 1, 6. 8: 8, 4, 2, 1, 6, 3, 8. 9: 9, 14, 7, 12, 6, 3, 8, 4, 2, 1, 6. 10: 10, 5, 10. 11: 11, 16, 8, 4, 2, 1, 6, 3, 8. 12: 12, 6, 3, 8, 4, 2, 1, 6. 13: 13, 18, 9, 14, 7, 12, 6, 3, 8, 4, 2, 1, 6. 14: 14, 7, 12, 6, 3, 8, 4, 2, 1, 6. 15: 15, 20, 10, 5, 10. 16: 16, 8, 4, 2, 1, 6, 3, 8. 17: 17, 22, 11, 16, 8, 4, 2, 1, 6, 3, 8. 18: 18, 9, 14, 7, 12, 6, 3, 8, 4, 2, 1, 6. 19: 19, 24, 12, 6, 3, 8, 4, 2, 1, 6. 20: 20, 10, 5, 10. Loops: 6, 3, 8, 4, 2, 1 (every start number that is not a multiple of 5) and 5, 10 (5, 10, 15, 20).
- Spreadsheet formulas (work in Excel and Google Sheets): type a start number in A1. Algorithm A: in A2 type =IF(MOD(A1,2)=0,A1/2,3*A1+1). Algorithm B: in A2 type =IF(MOD(A1,2)=0,A1/2,A1+5). Fill A2 down about 30 rows. (For Algorithm A, the sequence keeps going 4, 2, 1, 4, 2, 1 after it reaches 1, because the spreadsheet has no stop step.)
- Mini whiteboards, exit ticket slips, optional calculators