A collection of games and interactive statistics about the Collatz conjecture.
Start with a number n ∊ ℕ
- If n is even → n becomes n / 2.
- If n is odd → n becomes 3n + 1.
- Repeat
8 → 4 → 2 → 1 → 4 → ...
5 → 16 → 8 → 4 → 2 → 1 → 4 → ...
Any number sequence of a starting number n ∊ ℕ (Collatz sequence) ends in the following scheme 4 → 2 → 1 → 4 → ...
1.3 has not been proven.
The length of the Collatz sequence is the number of steps required to get to the value 1.
A presentation on how Maths relates to Music.
These sites are built using completely static HTML, CSS and JS, as well as some C++ that is compiled to WebAssembly for performance. We don't use warehouses of Node packages, instead we use KaTeX for math rendering, Chart.js for plotting charts, and reveal.js for presentations. The build, of course, requires more dependencies.
For a full rebuild of collatz-collection you will need the following software:
- A POSIX system (
sh
,mkdir
,rm
,time
, ...) make
inkscape
imagemagick
graphviz
qrencode
clang++
lld
(forwasm-ld
)python3
npx
(forbabel
andhtml-minify
)deno
(do not install it via snap asDeno.run
wouldn't work properly)graphviz
(fordot
)- Optionally
wasmer
for testing
and the following fonts:
On a Debian-based system, run these commands:
apt install -y make python3 curl inkscape imagemagick graphviz qrencode clang lld-12 nodejs npm fonts-inter
curl -Lo /usr/share/fonts/truetype/Manjari.ttf 'https://github.com/google/fonts/raw/main/ofl/manjari/Manjari-Regular.ttf'
Even though installing deno without the 'install.sh' is recommended, running this command is fast and easy and gets you deno installed.
curl -fsSL https://deno.land/x/install/install.sh | export DENO_INSTALL=/usr/local sh
- Delete the previous build:
make clean
- Build:
make -j$(nproc) all
- Optionally test and benchmark:
make test benchmark