login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A224166 Number of halving and tripling steps to reach the last number of the cycle in the Collatz (3x+1) problem for the negative integers (the initial term is counted). 3

%I #19 Jan 24 2021 11:16:46

%S 2,2,5,3,5,6,5,4,12,5,7,7,10,5,10,5,18,13,8,5,24,8,19,8,18,11,8,6,11,

%T 11,22,6,29,18,14,14,18,9,14,6,18,25,9,9,23,20,17,9,27,18,12,12,17,9,

%U 18,7,30,12,12,12,18,23,20,7,38,30,21,18,20,15,20,15

%N Number of halving and tripling steps to reach the last number of the cycle in the Collatz (3x+1) problem for the negative integers (the initial term is counted).

%F a(n) = A224183(n) + 1.

%e 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.

%t 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}]

%Y Cf. A006577, A224183.

%K nonn

%O 1,1

%A _Michel Lagneau_, Apr 01 2013

%E a(1) changed to 2 by _Pontus von Brömssen_, Jan 24 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 15 13:24 EDT 2024. Contains 375173 sequences. (Running on oeis4.)