Skip to content

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

Notifications You must be signed in to change notification settings

PiyushSuthar/Collatz-Conjecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

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)

Topics

Resources

Stars

Watchers

Forks