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.
%I A213672 #9 Mar 03 2013 23:47:58 %S A213672 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 A213672 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 A213672 86,0,0,60,0,0,728,0,0,66,0,0,104,0,0,72,110,0,128,0 %N A213672 Final term in Collatz trajectory of n that did not appear in previous trajectories. %C A213672 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 A213672 T. D. Noe, <a href="/A213672/b213672.txt">Table of n, a(n) for n = 1..10000</a> %e A213672 a(7)=20 because after 20 trajectory of 7 becomes identical with trajectory of 3. %t A213672 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 A213672 Cf. A177729, A222118. %K A213672 nonn %O A213672 1,2 %A A213672 _Jayanta Basu_, Mar 03 2013