Inspired by Brent Yorgey Factorization Diagrams, Stephen Von Worley wrote an algorithm which creates visuals on the fly for all natural numbers. The result is a mesmerizing dance of primes, composites, and their constituents. Watch primes (represented as circular arrays) as they become rarer in the higher numbers. Even rarer, watch for “Twin Primes” – primes that differ by 2 – and observe their increasing scarcity over time. Each composite number is accompanied by an array of its factors, and its Prime Factorization, and the program will run indefinitely (we got up to 40,000).
Looking for another one like it? Check out “Primitives” by Alec McEachran. In this one, if you click on the bar on the right (that shows a 2 and a 3 in circles for example) and drag them into a different order you can make “three groups of two” into “two groups of three”. You may want to encourage students to create their own ways to “tally” numbers, similar to this poster from Brown University.