cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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).

This page as a plain text file.
%I A224166 #19 Jan 24 2021 11:16:46
%S A224166 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 A224166 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 A224166 18,7,30,12,12,12,18,23,20,7,38,30,21,18,20,15,20,15
%N 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).
%F A224166 a(n) = A224183(n) + 1.
%e A224166 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 A224166 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 A224166 Cf. A006577, A224183.
%K A224166 nonn
%O A224166 1,1
%A A224166 _Michel Lagneau_, Apr 01 2013
%E A224166 a(1) changed to 2 by _Pontus von Brömssen_, Jan 24 2021