The visual representation of The Simplest Math Problem No One Can Solve. (3N+1 Problem)
The infamous Collatz conjecture says that if you start with any positive integer, you’ll always end up in this loop.
The result, at some point, will end up in a loop of 4,2,1
.
I'll suggest you watch The Simplest Math Problem No One Can Solve by Veritasium. Or read The Simple Math Problem We Still Can’t Solve
Basically what it does is that when we give some number as an input, it checks if it's odd or even. If the number is odd, it'll multiply it by 3 and add 1. And if the number is even it'll divide it by 2.
It will keep on doing it and after some time, it'll reach at a point where it'll be in a loop of 4 -> 2 -> 1 -> 4 -> 2 ->...
If you think something's missing or can be added. Do let me know in the issues or Just give a Pull Request!