After the last two posts, I think I need to explain the reason why I chose the functions\[f_p(n) =\begin{cases}f_p(n/p) & \text{ if $p$ divides $n$ }\\n & \text{otherwise}\end{cases} \] and \[ g_p(n) = \begin{cases} g_p( f_p (n) ) & \text{ if $p$ divides $n$ }\\ f_p( np + n + p - (n \text{ mod } p) ) & \text{ otherwise } \end{cases} \] as the proper generalization of the function \(3n+1\) of the Collatz Conjecture. For that we need to go back to the original conjecture.
Consider the functions in the original conjecture in the binary. We have two functions \[ f(n) = \begin{cases} n/2 & \text{ if $n$ is even }\\ n & \text{otherwise} \end{cases} \] and \[ g(n) = \begin{cases} f(n) & \text{ if $n$ is even }\\ f(3n+1) & \text{ otherwise} \end{cases} \] The first function deletes one trailing 0 in the binary description of \(n\) while the other does
For example: if \(n\) were \(10001\) in binary then \[ 100010 + 10001 + 1 = 110011 + 1 = 1100100 \] And after deleting the trailing 0’s we get \(11001\). The cycle we would like our all recursive sequences to end with is \[ 1 \rightarrow 11 + 1 = 100 \rightarrow 10 \rightarrow 1 \] I don’t know you but this behaves like a 1-D version of a Conway’s Game of Life, or more generally, a Cellular Automaton.
So, I thought wouldn’t it be neat if one defined a similar game for representations of natural numbers in base \(p\). Hence I defined \(f_p(n)\) and \(g_p(n)\).