# Near misses to the start of a potential loop in the Collatz sequence

A355239 contains numbers $$k>4$$ whose Collatz trajectory visits $$k-1$$ or $$k+1$$. These can be considered as near misses to the start of a second potential loop in the Collatz sequence. The last term is 9233. I've searched for further terms, but couldn't find any up to 31,100,000,000. Can anyone find any further terms?

• Comments are not for extended discussion; this conversation has been moved to chat. Oct 13, 2022 at 16:10
• Update Just to document a basic crosscheck: nothing between 10,000 and 1,000,000,000 (1.5 hrs, Delphi 64 bit) (previous crosscheck using numerical precision of 32bit has been insufficient on large numbers!) Oct 14, 2022 at 7:01

The question of that type of cycle-near-misses ("cnm") is not much different from the general question of cycles in the Collatz-problem. We don't have a complete solution, but at least we have upper bounds for the members of a possible cycle, for which always a solution in rational numbers is present.

Let $$N$$ denote the number of odd steps ($$3x+1$$) and $$S$$ the number of even steps $$x/2$$, which is also the "$$S$$"um of the exponents at $$2$$ in the "Syracuse"-notation, which I usually prefer in my analyses.

1) Evaluation-scheme for general cycles

For a cycle the minimal element $$a_1$$ (we take the minimal element as leading one) we have the upper bound from the calculation of the rational solution, when all elements $$a_1,a_2,...,a_N$$ are equal to some mean-value $$\alpha$$ : $$2^S= (3+\frac1{\alpha})^N \qquad \implies \qquad \alpha = {1 \over 2^{S/N}-3} \qquad \implies \qquad a_1 \lt \alpha \tag 1$$ and so we do not need to search for arbitrary large elements $$a_k$$ to check whether a cycle of a certain length $$N$$ is possible.

Now the approximation of $$2^{S/N}$$ to $$3$$ is much jittering with increasing $$N$$ and might go near to zero so the "mean"-value $$\alpha$$ might go to very large values. However, there are bounds for the nearest approximation of $$2^S-3^N$$ or in our formulation $$2^{S/N}-3$$ known, for instance given by J. Ellison or G. Rhin (which we frequently refer to here in MSE). That bounds are however weak: they allow very large $$\alpha$$ . I use often a conjectured sharper upper bound which I verified for $$N$$ up to a million digits given by $${ 1\over c \cdot N \cdot \ln N} \lt S \ln2 - N \ln 3 \tag 2$$ For extremely large $$N$$ there are peaks which need $$c=10$$ for the rhs to fall above the lower bounds, but for $$N \lt 10^{74}$$ (I've done a quick check using the first $$160$$ convergents of the cont.frac. of $$\log_2(3)$$) we need only $$c=2.5$$ .
From this estimate we can conclude an upper bound for $$\alpha(N)$$ as $$\alpha(N) \le c \cdot N^2 \ln N \tag {2a}$$ which means, for cycles of length $$N=100$$ odd steps we need only check $$a_1 \lt 116 \; 000$$ say, for $$N=1000$$ we get $$a_1 \lt 17\; 300\; 000$$ and so on.

2) Evaluation for "cycle-near-misses"

Now your modification towards "cycle-near-misses" gives a small modification in the equation (1). We need to include the $$a_1+1$$ or $$a_1-1$$ as the near-miss of $$a_1$$ arriving at the following form for some new mean value $$\alpha_1$$: $$2^S= (1+\frac1{\alpha_1})\cdot (3+\frac1{\alpha_1})^N \tag 3$$ (the derivation is not difficult).

Unfortunately I couldn't do a nice closed form for the calculation, so I did numerical search. Noticing that $$\alpha_1 > \alpha$$, $$\lim_{N \to \infty} {\alpha_1(N) \over \alpha(N)} =1$$ I found that $$\alpha(N) \lt \alpha_1(N) \lt 1.6 \alpha(N) \tag 4$$

From this, the upper bound for any smallest element in a cnm can be given in terms of the length $$N$$ of an assumed cnm as $$a_1 \lt 1.6 \cdot 2.5 \cdot N^2 \cdot \ln(N) \tag 5$$ for $$N \lt 10^{74}$$ and having only exceptional cases needing $$c=10$$ for $$N \lt 10^{10^6}$$

3) Conclusion using your given data

This small calculation does not give a disproof of the existence of cycle-near-misses, but after you've tested elements $$a_1 \lt 31.1 \cdot 10^9$$ we get -with all that rough estimates- that no cnm with length $$N \lt 27572$$ can exist except that which you have found in small numbers $$N$$ and $$a_1$$.