Simple visualization of the Collatz Conjecture
The Collatz Conjecture is a mathematical conjecture that has been neither proven nor disproven. It proposes that any positive integer will form a sequence that eventually reaches zero when applying only 2 simple rules
- If the number is even, divide by 2
- Else, if the number is odd, multiply by 3 and add 1
Example Output: Enter a positive integer: 93 Drawing Collatz Tree... └─ 93 └─ 280 └─ 140 └─ 70 └─ 35 └─ 106 └─ 53 └─ 160 └─ 80 └─ 40 └─ 20 └─ 10 └─ 5 └─ 16 └─ 8 └─ 4 └─ 2 └─ 1