Let [tex]x_n[/tex] be an odd positive integer. From the sequence's formula, [tex]x_{n+1}=\frac{(3x_n+1)}{2^k}[/tex], [tex]x_{n+2}=\frac{(3x_{n+1}+1)}{2^m}[/tex], and so forth.
For there to exist a cycle in the sequence, there must exist an odd integer [tex]x_0[/tex] such that [tex]x_n=x_0[/tex]
For an odd integer [tex]x_0[/tex], the next odd integer, [tex]x_1[/tex] will be given by [tex]\frac{3x_0+1}{2^k}[/tex]. For [tex]x_1\geq x_0, k<2[/tex]
To check whether a one step cycle exists,
\begin{align*}
\frac{3x_0+1}{2^k}&=x_0\\
2^kx_0-3x_0&=1\\
x_0&=\frac{1}{2^k-3}\\
\end{align*}
The only value of $k$ such that $x_0$ is a positive integer is 2 to give $x_0=1$. Hence, a one step cycle exists only at 1, and we note that it is the only integer such that $x_1=x_0$ where $k=2$. For any other positive odd integer, for $x_1\geq x_0$, then $k=1$. $k$ cannot be 0 because $3x_0+1$ will always be even.
The second odd integer, [tex]x_2[/tex] is given by
\begin{align*}
x_2&=\frac{3x_1+1}{2^m}\\
&=\frac{3(\frac{3x_0+1}{2^k})+1}{2^m}\\
&=\frac{9x_0+3+2^k}{2^{k+m}}
\end{align*}
$x_2\geq x_0$ iff $k+m<4$. This is because the we have multiplied $x_0$ by a factor of $3\times 3$ or 9, and hence we can divide the result by $2^3$ or 8 to get a whole number and not $2^4$.\\
To check whether a two step cycle exists,
\begin{align*}
\frac{9x_0+3+2^k}{2^{k+m}}&=x_0\\
2^{k+m}x_0-9x_0&=3+2^k\\
x_0&=\frac{3+2^k}{2^{k+m}-9}\\
\end{align*}
For [tex]x_0[/tex] to be a positive number, then [tex]2^{k+m}>9[/tex], which means [tex]2^{k+m}>2^3[/tex], a contradiction. Again, the only value that satisfies the equation is such that [tex]x_0[/tex] is 1 for $k=2$ and $m=2$. The equation cannot yield [tex]x_0>1[/tex] because [tex]2^{k+m}>9[/tex]
The third odd integer will be given by
\begin{align*}
x_3&=\frac{3x_2+1}{2^p}\\
&=\frac{3(\frac{3x_1+1}{2^m})+1}{2^p}\\
&=\frac{3(\frac{9x_0+3+2^k}{2^{k+m}})+1}{2^p}\\
&=\frac{27x_0+9+3.2^k+2^{k+m}}{2^{k+m+p}}
\end{align*}
For any [tex]x_0>1, x_3>x_0[/tex] if [tex]k+m+p<5[/tex]. This is because we multiply [tex]x_0[/tex] by a factor of [tex]3\times 3\times 3[/tex] or 27, and hence if we divide the result by $2^5$, 32, we would end up with a number less than [tex]x_0[/tex]
We still check whether there exists an integer $x_0$ from which a three step cycle occurs.
\begin{align*}
\frac{27x_0+9+3.2^k+2^{k+m}}{2^{k+m+p}}&=x_0\\
2^{k+m+p}x_0-27x_0&=9+3.2^k+2^{k+m}\\
x_0&=\frac{9+3.2^k+2^{k+m}}{2^{k+m+p}-27}
\end{align*}
Similarly, for [tex]x_0[/tex] to be a positive integer, [tex]2^{k+m+p}>27[/tex], contradicting our earlier findings. Only one special case holds for this equation too, [tex]x_0=1[/tex] when [tex]k=m=p=2[/tex].
In general, when we check $x_0$ for an $n$ step cycle, we generate the following equation $$\frac{x_0=3^{n-1}+3^{n-2}2^{a_1}+3^{n-2}2^{a_1+a_2}+...+3.2^{a_1+a_2+a_3+...+a_{n-1}}+2^{a_1+a_2+a_3+...+a_n}}{2^{a_1+a_2+a_3+...+a_n}-3^n}$$
For any [tex]x_0>1[/tex], [tex]2^{a_1+a_2+a_3+...+a_n}<3^n[/tex] or [tex]2^{a_1+a_2+a_3+...+a_n}<2^{2n}[/tex] and hence, the equation cannot have any value above 1.
[tex]x_0[/tex] can only be 1 iff each [tex]a_i=2[/tex]. The values of [tex]a_i[/tex] can be found by equating the numerator to the denominator.
This proves that no cycle exists apart from \{$4$, $2$, $1$\}.