cp's OEIS Frontend

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.

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

Original entry on oeis.org

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

Views

Author

Labos Elemer, Aug 27 2003

Keywords

Examples

			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.
		

Crossrefs

Cf. A025586.

Programs

  • 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 *)