top of page

Entry #:

52

Entry Title:

Collatz Cruncher

Project Description:

This program calculates millions of numbers to check if the number ends in the 4-2-1 sequence.
How the Collatz Conjecture works:
1. Choose a random number.
2. You apply two rules:
If the number is even, divide it by 2.
If the number is odd, multiply it by 3 and add 1.
3. Repeat step 2 until the number becomes 1.

Example:
number: 3
3 times 3 plus 1 = 10
10 divided by 2 = 5
5 times 3 plus 1 = 16
16 divided by 2 = 8
8 divided by 2 = 4
4 divided by 2 = 2
2 divided by 2 = 1
1 times 3 plus 1 = 4
4 divided by 2 = 2
... (you are stuck in a 4 2 1 loop)

Directions for viewing entry:

You can view the instructions for running the program here:
https://github.com/perspector/Collatz-Cruncher/blob/main/README.md

Click the button for the full size photo or complete project.

Contact

For Category Descriptions and Judging Criteria, go to Categories & Regulations. To record your score for this entry, head to the scoring form.

bottom of page