[go: up one dir, main page]

login
A087225
Position of the largest peak value in Collatz (3x+1) trajectory.
2
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, 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, 1, 2, 3, 4, 1, 2, 5, 69, 1, 82, 3, 4, 6, 2, 12, 8, 1, 2, 77, 77
OFFSET
1,3
EXAMPLE
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.
MATHEMATICA
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 *)
CROSSREFS
Cf. A025586.
Sequence in context: A125560 A046573 A006287 * A366619 A343404 A220182
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 27 2003
STATUS
approved