ScratchData LogoScratchData
Back to gdxfor's profile

Collatz conjecture graph

GDgdxfor•Created August 5, 2021
Collatz conjecture graph
2
2
5 views
View on Scratch

Instructions

The Collatz Conjecture graphed. For the people who are interested to see how the project works here is a quick explanation: Then is first set to 0 at the beginning of the project, to avoid any glitches with the previous numbers. Then the project will do the following: - if the number is odd, then x is first multiplied by 3 and then one is added - if the number is even, then x is divided by 2 When x reaches one, then it will get stuck in an infinite loop, going 4 ➜ 2 ➜ 1 ➜ 4 ➜ 2 ➜ 1 etc. To avoid this, the program will stop when x reaches 1, then tally up how many times the program had to do 3x+1 or x/2.

Project Details

Project ID558247621
CreatedAugust 5, 2021
Last ModifiedMarch 2, 2024
SharedAugust 5, 2021
Visibilityvisible
CommentsAllowed