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.

A365478 In the Collatz problem, largest value in the trajectory of n in the 3x+1 function (denoted by T(x) in the literature, and defined as T(x) = (3x+1)/2 if x is odd, T(x) = x/2 if x is even), or -1 if the trajectory is divergent.

Original entry on oeis.org

1, 2, 8, 4, 8, 8, 26, 8, 26, 10, 26, 12, 20, 26, 80, 16, 26, 26, 44, 20, 32, 26, 80, 24, 44, 26, 4616, 28, 44, 80, 4616, 32, 50, 34, 80, 36, 56, 44, 152, 40, 4616, 42, 98, 44, 68, 80, 4616, 48, 74, 50, 116, 52, 80, 4616, 4616, 56, 98, 58, 152, 80, 92, 4616, 4616
Offset: 1

Views

Author

Paolo Xausa, Sep 05 2023

Keywords

Comments

This sequence differs from A025586, where the division by 2 does not immediately follow the 3x+1 step when x is odd.
Here by definition the trajectory ends when 1 is reached, so a(1) = 1.
Kontorovich and Lagarias (2009, 2010) call these values the maximum excursion values.

Examples

			a(11) = 26 because 26 is the largest value in the trajectory 11 -> 17 -> 26 -> 13 -> 20 -> 10 -> 5 -> 8 -> 4 -> 2 -> 1.
		

Crossrefs

Cf. A014682, A025586 (equivalent for the Collatz function), A166245.

Programs

  • Mathematica
    A365478[n_]:=Max[NestWhileList[If[OddQ[#],(3#+1)/2,#/2]&,n,#>1&]];Array[A365478,100]

Formula

a(n) <= A025586(n).