OFFSET
1,2
COMMENTS
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.
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
EXAMPLE
a(7)=20 because after 20 trajectory of 7 becomes identical with trajectory of 3.
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jayanta Basu, Mar 03 2013
STATUS
approved