login
Final term in Collatz trajectory of n that did not appear in previous trajectories.
1

%I #9 Mar 03 2013 23:47:58

%S 1,2,4,0,0,6,20,0,14,0,0,12,0,0,80,0,0,18,44,0,32,0,0,24,38,0,92,0,0,

%T 30,0,0,50,0,0,36,56,0,152,0,0,42,74,0,68,0,0,48,0,0,116,0,0,54,188,0,

%U 86,0,0,60,0,0,728,0,0,66,0,0,104,0,0,72,110,0,128,0

%N Final term in Collatz trajectory of n that did not appear in previous trajectories.

%C This can be considered as the step down value, as beyond this point the trajectory of n reduces to a lower trajectory. When n is impure we define a(n)=0; see also A177729.

%H T. D. Noe, <a href="/A213672/b213672.txt">Table of n, a(n) for n = 1..10000</a>

%e a(7)=20 because after 20 trajectory of 7 becomes identical with trajectory of 3.

%t Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; prev = {}; Table[c = Collatz[n]; If[Complement[c, prev] == {}, 0, i = 1; While[MemberQ[prev, c[[-i]]], i++]; prev = Union[prev, c]; c[[-i]]], {n, 100}] (* _T. D. Noe_, Mar 03 2013 *)

%Y Cf. A177729, A222118.

%K nonn

%O 1,2

%A _Jayanta Basu_, Mar 03 2013