Skip to content

This is a tiny program that simulates the collatz conjecture. Enter any integer greater than 1 and let the simulation run.

License

Notifications You must be signed in to change notification settings

rdsov/collatz-conjecture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

collatz-conjecture

This is a tiny program that simulates the collatz conjecture. Enter any integer greater than 1 and let the simulation run.


What is the collatz conjecture?

  1. Start with any integer n > 0.
  2. If even, divite n by two.
  3. If odd, multiply n by three and then add one.
  4. Repeat this process.

The interesting thing is that n will always end in the 4, 2, 1 cycle.

About

This is a tiny program that simulates the collatz conjecture. Enter any integer greater than 1 and let the simulation run.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published