Skip to content

An implementation of the infamous Collatz Conjecture, which is also known as Hailstone's Sequence, written in Python 3.

Notifications You must be signed in to change notification settings

Kaweees/Collatz.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers

Collatz.py

An implementation of the infamous Collatz Conjecture, which is also known as Hailstone's Sequence, written in Python 3.

Built With

  • Python 3:
    • math
    • time
    • tabulate
    • matplotlib.pyplot

Collatz conjecture

The Collatz conjecture is a conjecture in mathematics that proposes that given any nonnegative odd interger greater than or equal 1, the elements [4, 2, 1] will be infinitely repeated by the sequence created by replicating the following algorithm:

  1. Start with any nonnegative odd interger greater than or equal 1 as the first term.
  2. If the previous term is even, the next term is one half the previous term.
  3. If the previous term is odd, the next term is 3 times the previous term plus 1.
  4. Repeat Steps 1-3 with the created term

To learn more about the Collatz conjecture, visit the Wikipedia Article attributed to it.

About

An implementation of the infamous Collatz Conjecture, which is also known as Hailstone's Sequence, written in Python 3.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages