OFFSET
1,1
FORMULA
a(n) = A224183(n) + 1.
EXAMPLE
a(10) = 5 because the trajectory of -10 is -10 -> -5 -> -14 -> -7 -> -20 -> -10 and -10 is the last term of the cycle, hence 5 iterations where the first term -10 is counted.
MATHEMATICA
Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, UnsameQ, All]; Table[s = Collatz[-n]; len = Length[s] - 2; If[s[[-1]] == 2, len = len - 1]; len+1, {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Apr 01 2013
EXTENSIONS
a(1) changed to 2 by Pontus von Brömssen, Jan 24 2021
STATUS
approved