The Collatz conjecture is an unsolved number theory problem. This Python library provides tools to analyse it from different perspectives. The project has contributed to multiple scientific publications:
The library provides the following modules:
- automata - automatons that model certain aspects of the Collatz problem
- commons - common functions for creating and analysing Collatz sequences
- cycles - functions to analyse cycles in Collatz sequences
- generator - functions to generate Collatz sequences and related features
- graph - functions to create and analyse Collatz graphs
The project furthermore offers jupyter notebooks and scripts for data exports. The notebooks are stored as markdown files to support efficient versioning in git. The synchronisation between markdown files and ipynb files is handled by the framework jupytext (for further instructions see below).
The source code is currently hosted on GitHub at: https://github.com/c4ristian/collatz
conda env create -f environment.yml
conda activate collatz
pytest
pytest --cov
pylint FILENAME.py
python FILENAME.py
jupytext --sync notebooks/*.md
jupytext --sync notebooks/*/*.md
jupytext --set-formats ipynb,md notebooks/NOTEBOOK.ipynb
python -m ipykernel install --user --name=collatz
jupyter notebook --notebook-dir="./notebooks"