Education Technology

Highly Composite ACT 4

Updated on 03/02/2023

Activity Overview

This activity is part 4 of the module "Code by Numbers" which can be downloaded as a complete booklet from the STEM section of the website. In this activity students explore the set of numbers that possess more factors than all their predecessors, Highly Composite Numbers. Students incorporate some of their previous programs and algorithms to build a program that automatically finds Highly Composite Numbers. These numbers are rich for investigation, and are still be explored to this day! 


This activity covers multiple objectives including improved number sense, pseudo-coding, coding, algorithmic thinking, problem solving and investigations. Students also see the power in representing numbers in different forms, including as a product of its prime factors. Students need to pose and test hypothesis as they work towards being able to predict subsequent highly composite numbers. They can improve their coding algorithms to the point of creating a level of AI within their coding.



  • Factors
  • Composite
  • Highly Composite
  • Pseudo-code
  • Algorithm


  • def function
  • if
  • for
  • % (Modular Arithmetic)
  • while

About the Lesson

This activity is Part 4 of the series Code by Numbers. This activity requires students to turn explore Highly Composite Numbers. On the surface it is hard to see the patterns, however, change the representation of the number to its prime factorisation and the patterns start to emerge. Don't make too many assumptions however as some of the patterns disappear when you least expect it. Mathematicians are still exploring HCN's, so this activity is a genuine mathematical investigation that incorporates coding, logic, reasoning, hypothesis posing and testing and much more.