The Collatz conjecture, also known as the 3n + 1 conjecture, was proposed by mathematician Lothar Collatz in 1937. The conjecture involves a sequence defined as follows: If the number is even, divide it by 2. If the number is odd, multiply it by 3 and add 1 (i.e.,3n+1). This process is repeated for the resulting number. The conjecture asserts that no matter which positive integer you start with, you will eventually reach the number 1. Once at 1, the sequence enters a loop of 4, 2, 1. This project will stop once 1 is reached It can simulate all numbers but numbers above 54 will eventually reach > 180 which is the max y axis for the scratch project window. It will also play a tone relevant to the y position. If the path is too long, it will keep calculating, but the visual will not appear as a graph on screen, but try to keep drawing off-screen.
Just a simple visualization with sone vibraphone tones. See costume: CODE in sprite: Python version Up Arrow: show list Down Arrow: hide list