login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Position of the largest peak value in Collatz (3x+1) trajectory.
2

%I #15 Jun 25 2019 12:44:37

%S 1,1,4,1,2,5,6,1,9,3,4,6,2,7,8,1,2,10,4,1,2,5,6,1,7,3,78,8,2,9,73,1,2,

%T 3,4,11,2,5,11,1,76,3,4,6,2,7,71,1,2,8,4,1,2,79,79,1,7,3,9,10,2,74,74,

%U 1,2,3,4,1,2,5,69,1,82,3,4,6,2,12,8,1,2,77,77

%N Position of the largest peak value in Collatz (3x+1) trajectory.

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

%e For n=9: iteration-list = [9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1]; peak = 52 at 9th position, so a(9) = 9.

%t Collatz[n_] :=NestWhileList[If[EvenQ[#], #/2, 3*# + 1] &, n, # > 1 &]; Flatten[Table[Position[Collatz[n], Max[Collatz[n]]], {n, 96}]] (* _Jayanta Basu_, Mar 24 2013 *)

%Y Cf. A025586.

%K nonn

%O 1,3

%A _Labos Elemer_, Aug 27 2003