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.

A213538 Maximum deviation from n in Collatz trajectory of n.

Original entry on oeis.org

0, 1, 13, 3, 11, 10, 45, 7, 43, 9, 41, 11, 27, 38, 145, 15, 35, 34, 69, 19, 43, 30, 137, 23, 63, 25, 9205, 27, 59, 130, 9201, 31, 67, 33, 125, 35, 75, 50, 265, 39, 9191, 41, 153, 43, 91, 114, 9185, 47, 99, 49, 181, 51, 107, 9178, 9177, 55, 139, 57, 245, 100, 123
Offset: 1

Views

Author

Jayanta Basu, Mar 03 2013

Keywords

Comments

Assuming Collatz trajectory ends with 1 and also a(1)=0.

Examples

			a(3)=13 because the number furthest to 3 in Collatz trajectory of 3 is 16.
		

Crossrefs

Cf. A070165.

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Join[{0}, Table[Max[Rest[Abs[Collatz[n] - n]]], {n, 2, 100}]] (* T. D. Noe, Mar 04 2013 *)