OFFSET
1,3
COMMENTS
The currently known cycle minimums are 1, 5, 17 and there are no known a(n) = -1 (trajectory never reaches a cycle).
This sequence is one way to extend A006666 (number of Collatz (3x+1)/2 steps) to the negative numbers.
EXAMPLE
For n = 5, a(5) = 0 because 5 is already the minimum of its "final cycle".
For n = 12, a(12) = 6 because 12 takes 6 iterations to reach the minimum of its "final cycle": 12 -> 6 -> 3 -> 8 -> 4 -> 2 -> 1.
PROG
(Julia)
function three_x_minus_one_delay(n::Int)
count = 0
while (n != 1 && n != 5 && n != 17)
if (isodd(n))
n += n << 1 - 1
end
n >>= 1
count += 1
end
return count
end
CROSSREFS
KEYWORD
nonn
AUTHOR
Kevin Ge, Oct 28 2024
STATUS
approved