Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Syracuse

The Syracuse Sequence

The Syracuse (Collatz or Hailstone) conjecture concerns a sequence of integers defined as follows:

Starts with any positive integer N

  And each term is formed from the previous one as follows:

    if the previous term is odd:

        the next term is 3 times the previous term and plus 1

$$ 3*N + 1 $$

    if the previous term is even:

        the next term is half the previous term

$$ N / 2 $$

The sequence will always reach 1. 🏁

Solution

Additional libraries used for visualization:

Seaborn

pip install seaborn

Matplotlib

pip install matplotlib

Plotext

pip install plotext

Clone this repository :

$ git clone https://github.com/skuantaiuly/Syracuse.git

Author

Kuantaiuly Salamat

11/2022, developed on IPython and Jupyter Notebook, Visual Studio Code

Releases

Packages

Contributors

Languages