PiyushSuthar / Collatz-Conjecture

The visual representation of The Simplest Math Problem No One Can Solve. (3N+1 Problem)

Home Page:https://piyushsuthar.github.io/Collatz-Conjecture/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collatz-Conjecture

The visual representation of The Simplest Math Problem No One Can Solve. (3N+1 Problem)

AKA The 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.

How does this work?

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 ->...

Contributing

If you think something's missing or can be added. Do let me know in the issues or Just give a Pull Request!

About

The visual representation of The Simplest Math Problem No One Can Solve. (3N+1 Problem)

https://piyushsuthar.github.io/Collatz-Conjecture/


Languages

Language:HTML 84.1%Language:JavaScript 15.9%