One thing I did note about my initial result was that $2n+1$ is the derivative of $n^2+n$. No idea if this is in any way significant, but I thought it was cool to note. ]]>

\begin{align} c(c(c(n))) = c^3(n) = \begin{cases} n/8 & n \equiv 0 \pmod 8 \\ (9n+7)/8 & n \equiv 1 \pmod 8 \\ (3n+2)/8 & n \equiv 2 \pmod 8 \\ (9n+5)/8 & n \equiv 3 \pmod 8 \\ (3n+4)/8 & n \equiv 4 \pmod 8 \\ (3n+1)/8 & n \equiv 5 \pmod 8 \\ (9n+10)/8 & n \equiv 6 \pmod 8 \\ (27n+19)/8 & n \equiv 7 \pmod 8 \end{cases} \end{align}

Note that each function is divided by 8 and that the coefficient of *n* is a power of 3, specifically $3^o$ where *o* is the number of odd numbers encountered in the iterations. I did a bit of independent research a while back to find a pattern to these functions, but my searches on the OEIS and WolframAlpha were not very fruitful.

\begin{align} c(n)=\frac{1}{2}n \pmod{2n+1} \end{align}

In the ring **Z**_{2n+1}, 2 had an inverse (namely, `n+1`), so this is valid. Plus, if ` n` is even, you can just divide by 2 directly.

Alternatively,

\begin{align} c(n)=-n^{2} \pmod{2n+1} \end{align}

This is of interest to me as a while ago I designed a very efficient circuit to compute -x^{2} !

kg583, as I was reading your point about any numbers congruent modulo 2^i I got a bit lost. Can you explain that a bit further?

]]>\begin{align} C(n) = \begin{cases} n/2 & n \equiv 0 \pmod 2 \\ 3n+1 & n \equiv 1 \pmod 2 \end{cases} \end{align}

However, as you pointed out, this function is always even for odd input *n*. Thus, the "shortcut" function is

\begin{align} C^{*}(n) = \begin{cases} n/2 & n \equiv 0 \pmod 2 \\ \frac{3n+1}{2} & n \equiv 1 \pmod 2 \end{cases} \end{align}

I was able to find by simply messing around another simplification

(3)\begin{align} c(n) = n^2 + n \pmod{2n+1} \end{align}

which can easily shown to yield the same iterations as the original definition. A few other notes:

- If you were to represent
*i*iterations of some input*n*as a function of*n*, then this function will be identical for all*n*that are congruent modulo $2^i$. This means that, for example, there is a function that maps all values of*n*that leave remainder 1 when divided by 4 to the second iteration of the Collatz function for that*n*.- The calculation of the function is easily shown to be based on the value $2^i$ and the number of odd steps in the iteration.

- If any loop other than $4 \rightarrow 2 \rightarrow 1 \rightarrow 4$ exists, it much have at least 68 members.
- Heuristic arguments suggest no number can grow indefinitely, as each input is either halved or multiplied by 1.5, though this is not a valid proof.
- The Collatz function and its shortcut can also be represented as singular functions involving $\sin$ or $\cos$ due to those functions cyclical behavior.

Most of this info comes directly from the Wikipedia page or papers referenced there.

]]>If n is odd, multiply n by three then add one. If n is even, divide n by 2. Take that answer and repeat the process such that you have a sequence. For any positive even integer n, does the sequence ever not terminate at 1?

My thoughts:

- Any sequence which reaches 1 terminates as it enters the loop 1>4>2>1
- Any sequence which contains a number known to terminate at 1, also terminates at one
- All odd numbers do not need to be checked
- Take a and b to both be positive odd integers.
- a can be written as 2c+1 by the definition of an odd number
- b can be written as 2d+1 by the definition of an odd number
- a*b = (2c+1)(2d+1) by subsitution
- (2c+1)(2d+1) = 4cd+2c+2d+1 by distribution
- 4cd+2c+2d+1 = (4cd+2c+2d)+1 by association
- (4cd+2c+2d)+1 = 2(2cd+c+d)+1 by distribution
- 2(2cd+c+d)+1 is an odd number by definition. any integer multiplied by 2 and added to 1 is odd.
- Any odd number plus one is even by definition
- Therefore, after one iteration any odd number will become even.

- For any integer a where n is equal to 2^a the sequence will terminate at 1
- Since 2^a is even, and can be divided by 2 exactly a times, the product of each iteration becomes 2^a-k where k is the current iteration
- When a=k then the product of the iteration will be 2^a-a which is 2^0 which is equal to 1

- Any sequence which enters a loop of any size is considered terminated.
- Any sequence which diverges, or never repeats a number, is considered to grow to infinity

Based on the proof above, does that mean that a solution to the problem would be to determine if all the series eventually reach a point of 2^n? Thereby making the conjecture:

If n is even divide n by 2. If n is odd, multiply n by three and add one, then divide by two. Take that answer and repeat the process such that you have a sequence. For any positive integer n, does the sequence ever not contain a value 2^n?

]]>