login
A355239
Starting values k > 4 of a Collatz iteration reaching either k-1 or k+1.
5
5, 6, 7, 9, 11, 14, 15, 17, 18, 19, 25, 33, 39, 41, 47, 51, 54, 57, 59, 62, 71, 81, 89, 91, 107, 108, 121, 159, 161, 166, 183, 243, 250, 252, 284, 333, 376, 378, 411, 432, 487, 501, 639, 649, 651, 667, 865, 889, 959, 975, 977, 1153, 1185, 1299, 1335, 1368, 1439, 1731, 1779, 1823, 2159, 2307, 2430, 2735, 3239, 3643, 4103, 4617, 4857, 4859, 6155, 7287, 7289, 9233
OFFSET
1,1
COMMENTS
No further terms up to 2*10^9. It is conjectured that this is the full list of starting values of Collatz trajectories reaching k-1 or k+1, and that the number of steps until this happens is one of the 8 terms of A355240.
There are no further terms up to 31100000000. - Dmitry Kamenetsky, Oct 17 2022
PROG
(Python)
def f(x): return 3*x+1 if x%2 else x//2
def ok(n):
if n < 5: return False
ni, targets = n, {1, n-1, n+1}
while ni not in targets: ni = f(ni)
return ni in {n-1, n+1}
print([k for k in range(10**4) if ok(k)]) # Michael S. Branicky, Jul 04 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jul 04 2022
STATUS
approved