Collatz Automata

Check the gist with the corresponding script.

Consider an almost empty tape with a single marked cell as the initial state, such that the following collatz function is applied to a starting $n$:

\[f(n) = \begin{cases} n/2 & \text{if} \quad n \equiv 0 \quad (\text{mod}\, 2) \\ (3n + 1)/2 & \text{if} \quad n \equiv 1 \quad (\text{mod}\, 2) \\ \end{cases}\]

and depending on the parity of $n$ either Rule 30 or another rule is applied during that step (e.g. if $n$ even Rule30 is applied, else Rule18 is applied). This is the example for $n = 10^{30}$ with (Rule30, Rule18):

Other examples

Back