Crandore Hub

collatz

Functions Related to the Collatz/Syracuse/3n+1 Problem

Provides the basic functionality to interact with the Collatz conjecture. The parameterisation uses the same (P,a,b) notation as Conway's generalisations. Besides the function and reverse function, there is also functionality to retrieve the hailstone sequence, the "stopping time"/"total stopping time", or tree-graph. The only restriction placed on parameters is that both P and a can't be 0. For further reading, see <https://en.wikipedia.org/wiki/Collatz_conjecture>.

Versions across snapshots

VersionRepositoryFileSize
1.0.0 rolling linux/jammy R-4.5 collatz_1.0.0.tar.gz 71.0 KiB
1.0.0 rolling linux/noble R-4.5 collatz_1.0.0.tar.gz 70.9 KiB
1.0.0 rolling source/ R- collatz_1.0.0.tar.gz 50.4 KiB
1.0.0 latest linux/jammy R-4.5 collatz_1.0.0.tar.gz 71.0 KiB
1.0.0 latest linux/noble R-4.5 collatz_1.0.0.tar.gz 70.9 KiB
1.0.0 latest source/ R- collatz_1.0.0.tar.gz 50.4 KiB
1.0.0 2026-04-26 source/ R- collatz_1.0.0.tar.gz 50.4 KiB
1.0.0 2026-04-23 source/ R- collatz_1.0.0.tar.gz 50.4 KiB
1.0.0 2026-04-09 windows/windows R-4.5 collatz_1.0.0.zip 79.8 KiB
1.0.0 2025-04-20 source/ R- collatz_1.0.0.tar.gz 50.4 KiB

Dependencies (latest)

Depends

Suggests