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 <>.

Version: 1.0.0
Depends: R (≥ 3.5.0), gmp
Suggests: roxygen2, testthat (≥ 3.0.0), devtools, covr, DT, pkgdown, servr, tinytex, knitr, rmarkdown
Published: 2022-09-05
DOI: 10.32614/CRAN.package.collatz
Author: Nathan Levett [aut, cre]
Maintainer: Nathan Levett <nathan.a.z.levett at>
License: Apache License (== 2.0)
NeedsCompilation: no
Materials: README
CRAN checks: collatz results


Reference manual: collatz.pdf
Vignettes: collatz
Hailstone Sequences
Hailstone of 27+576460752303423488
Tree Graphs


Package source: collatz_1.0.0.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): collatz_1.0.0.tgz, r-oldrel (arm64): collatz_1.0.0.tgz, r-release (x86_64): collatz_1.0.0.tgz, r-oldrel (x86_64): collatz_1.0.0.tgz


Please use the canonical form to link to this page.