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.

Previous Showing 21-30 of 60 results. Next

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).

A375280 Largest value in the trajectory of n in the A375265 map.

Original entry on oeis.org

1, 2, 3, 4, 16, 6, 52, 8, 9, 16, 52, 12, 40, 52, 16, 16, 52, 18, 88, 20, 52, 52, 160, 24, 88, 40, 27, 52, 88, 30, 9232, 32, 52, 52, 160, 36, 112, 88, 40, 40, 9232, 52, 196, 52, 45, 160, 9232, 48, 148, 88, 52, 52, 160, 54, 9232, 56, 88, 88, 304, 60, 184, 9232, 63
Offset: 1

Views

Author

Paolo Xausa, Aug 09 2024

Keywords

Comments

By definition the trajectory ends when 1 is reached, so a(1) = 1.

Examples

			a(10) = 16 because 16 is the largest value in the trajectory 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1.
		

Crossrefs

Programs

  • Mathematica
    A375265[n_] := Which[Divisible[n, 3], n/3, Divisible[n, 2], n/2, True, 3*n + 1];
    Array[Max[NestWhileList[A375265, #, # > 1 &]] &, 100]

Formula

a(n) = max{A375266(n,k) for 1 <= k <= A375267(n) + 1}.

A087701 Maximal term in Collatz-iteration started at -1+2^n.

Original entry on oeis.org

1, 16, 52, 160, 9232, 9232, 4372, 13120, 39364, 118096, 1276936, 1276936, 6810136, 9565936, 28697812, 86093440, 1570824736, 1570824736, 2324522932, 6973568800, 20920706404, 62762119216, 188286357652, 564859072960, 9161049517720
Offset: 1

Views

Author

Labos Elemer, Sep 24 2003

Keywords

Crossrefs

Cf. A025586.

Programs

  • Mathematica
    Table[Max[NestWhileList[If[EvenQ[#],#/2,3#+1]&,2^n-1,#>1&]],{n,30}] (* Harvey P. Dale, Jul 19 2019 *)

Formula

a(n) = A025586(2^n-1).

A087972 Maximal term in Collatz-iteration started at 3^n+1.

Original entry on oeis.org

2, 4, 16, 52, 9232, 244, 9232, 2464, 10528, 19684, 88576, 2270104, 1008916, 1594324, 7174456, 65451076, 64570084, 129140164, 1570824736, 1961316232, 8825923024, 10460353204, 47071589416, 105911076184, 423644304724, 66034034786644
Offset: 0

Views

Author

Labos Elemer, Sep 24 2003

Keywords

Crossrefs

Formula

a(n) = A025586(3^n+1).

Extensions

Offset changed to 0 and a(0) prepended by Amiram Eldar, Jun 04 2024

A105730 Number of different initial values for 3x+1 trajectories in which the largest term appearing in the iteration is 2^(6n+4).

Original entry on oeis.org

6, 12, 8, 6, 13, 8, 6, 9, 11, 6, 21, 8, 6, 78, 8, 6, 9, 13, 6, 15, 8, 6, 16, 8, 6, 9, 20, 6, 12, 8, 6, 13, 8, 6, 9, 11, 6, 14, 8, 6, 32, 8, 6, 9, 32, 6, 23, 8, 6, 24, 8, 6, 9, 14, 6, 12, 8, 6, 13, 8, 6, 9, 11, 6, 14, 8, 6, 19, 8, 6, 9, 13, 6, 80, 8, 6, 29, 8, 6, 9, 18, 6, 12, 8, 6, 13, 8, 6, 9, 11
Offset: 0

Views

Author

David Wasserman, Apr 18 2005

Keywords

Comments

From Hartmut F. W. Hoft, Jun 24 2016: (Start)
The sequence has the quasiperiod 6, x, 8, 6, y, 8, 6, 9, z of length 9 starting at index 0 where x, y, z > 10; in addition, a(3*9*n+1) = 12, a(3*9*n+4) = 13 and a(3*9*n+8) = 11 for all n>=0; proof by induction (see this link) as in the link in A087256 based on the modular identities in the link in A033496.
Conjecture: All numbers greater than 10 appear in the sequence (see also A033496 and A233293). (End)

Examples

			a(1) = 12, i.e. the number of initial values for 2^10, since 804 -> 402 -> 201 -> 604 -> 302 -> 151 -> 454 -> 227 -> 682 -> 341 -> 1024 and 908 -> (454 -> ... -> 1024) are the two maximal trajectories containing all 12 initial values. a(8) = 11 since 2^(6*8+4) has 11 different initial values for Collatz trajectories leading to it. - _Hartmut F. W. Hoft_, Jun 24 2016
		

Crossrefs

Programs

  • Mathematica
    trajectory[start_] := NestWhileList[If[OddQ[#], 3#+1, #/2]&, start, #!=1&]
    fanSize[max_] := Module[{active={max}, fan={}, current}, While[active!={}, current=First[active];active=Rest[active]; AppendTo[fan, current]; If[2*current<=max, AppendTo[active, 2*current]]; If[Mod[current, 3]==1 && OddQ[(current-1)/3] && current>4, AppendTo[active, (current-1)/3]]]; Length[fan]]/;max==Max[trajectory[max]]
    a105730[low_, high_] := Map[fanSize[2^(6#+4)]&, Range[low, high]]
    a105730[0,89] (* Hartmut F. W. Hoft, Jun 24 2016 *)

Formula

a(n) = A087256(6n+4).

A176869 Numbers that are the maximum value attained by the Collatz (3x+1) iteration of some odd number.

Original entry on oeis.org

1, 16, 40, 52, 64, 88, 100, 112, 136, 148, 160, 184, 196, 208, 232, 244, 256, 280, 304, 340, 352, 400, 424, 448, 472, 520, 532, 544, 592, 616, 628, 640, 688, 712, 724, 736, 784, 808, 820, 832, 868, 904, 916, 928, 952, 964, 976, 1024, 1048, 1072, 1108, 1120
Offset: 1

Views

Author

T. D. Noe, Apr 27 2010

Keywords

Comments

Here the 3x+1 steps and the halving steps are applied separately. We use odd numbers because then the Collatz iteration always increases to a maximum value before (hopefully) going to 1. This is a subsequence of A033496. Except for the first term, all these numbers appear to equal 4 (mod 12). Some terms are the maximum value for the Collatz iteration of many numbers. For example, 9232 is the maximum value of the Collatz iteration of 408 odd numbers, the smallest of which is 27.

Crossrefs

Cf. A025586 (maximum value in the Collatz iteration of n)

A375911 Largest value in the trajectory of 2*n - 1 in the Farkas map (A349407).

Original entry on oeis.org

1, 3, 5, 17, 9, 17, 17, 15, 17, 29, 21, 53, 25, 27, 29, 161, 33, 53, 37, 39, 41, 65, 45, 161, 49, 51, 53, 125, 57, 89, 161, 63, 65, 101, 69, 161, 73, 75, 77, 269, 81, 125, 85, 87, 89, 137, 161, 485, 97, 99, 101, 233, 105, 161, 125, 111, 113, 173, 117, 269, 161
Offset: 1

Views

Author

Paolo Xausa, Sep 02 2024

Keywords

Examples

			a(10) = 29 because 29 is the largest value in the trajectory 19 -> 29 -> 15 -> 5 -> 3 -> 1.
		

Crossrefs

Programs

  • Mathematica
    FarkasStep[x_] := Which[Divisible[x, 3], x/3, Mod[x, 4] == 3, (3*x + 1)/2, True, (x + 1)/2];
    Array[Max[FixedPointList[FarkasStep, 2*# - 1]] &, 100]

Formula

a(n) = max{A350279(n,k) for 1 <= k <= A375909(n) + 1}.

A087252 Numbers that are divisible by 4, but cannot be the largest peak value in a 3x+1 trajectory, regardless of the initial value.

Original entry on oeis.org

12, 28, 36, 44, 60, 76, 92, 108, 120, 124, 140, 156, 164, 172, 188, 204, 216, 220, 236, 248, 252, 268, 284, 292, 300, 316, 328, 332, 348, 364, 376, 380, 388, 396, 412, 420, 428, 432, 436, 440, 444, 460, 476, 484, 492, 496, 500, 504, 508, 516, 524, 540, 548
Offset: 1

Views

Author

Labos Elemer, Sep 08 2003

Keywords

Comments

It is provable that (beyond 1 and 2) the largest peak value in any 3x+1 (Collatz) trajectory must be a multiple of 4. However, an infinite number of multiples of 4 exist that cannot be the largest peak value of such a trajectory. E.g., no integer of the form 16k+12 = 4*(4k+3) (where k is a nonnegative integer) can be a largest peak value, because the trajectory immediately after the value 16k+12 would consist of the values 8k+6, 4k+3, 12k+10, 6k+5, and 18k+16, which exceeds 16k+12.

Crossrefs

Cf. A025586.

Extensions

Definition and example reworded by Jon E. Schoenfield, Sep 01 2013

A220421 Number of halving and tripling steps to reach the largest value in the Collatz (3x+1) trajectory of n.

Original entry on oeis.org

0, 0, 3, 0, 1, 4, 5, 0, 8, 2, 3, 5, 1, 6, 7, 0, 1, 9, 3, 0, 1, 4, 5, 0, 6, 2, 77, 7, 1, 8, 72, 0, 1, 2, 3, 10, 1, 4, 10, 0, 75, 2, 3, 5, 1, 6, 70, 0, 1, 7, 3, 0, 1, 78, 78, 0, 6, 2, 8, 9, 1, 73, 73, 0, 1, 2, 3, 0, 1, 4, 68, 0, 81, 2, 3, 5, 1, 11, 7, 0, 1, 76
Offset: 1

Views

Author

Jayanta Basu, Feb 19 2013

Keywords

Comments

a(n) = 0 if n is a power of 2, as a(1) = a(2) = a(4) = ... = 0; however a(20) = a(24) = ... = 0 also and as such the condition (n = 2^k, k>=0) is sufficient but not necessary for a(n) = 0.

Examples

			a(3) = 3 because the Collatz trajectory for 3 is [3, 10, 5, 16, 8, 4, 2, 1], reaching the largest term, 16, in three steps.
a(4) = 0 because the Collatz trajectory only goes down from 4.
a(20) = 0: 20 is the largest term in [20, 10, 5, 16, 8, 4, 2, 1].
		

Crossrefs

Programs

  • Mathematica
    Collatz[n_] :=NestWhileList[If[EvenQ[#], #/2, 3*# + 1] &, n, # > 1 &]; Table[Position[Collatz[n], Max[Collatz[n]]][[1, 1]] - 1, {n, 82}] (* Jayanta Basu, Mar 24 2013 *)

Formula

a(n) = A087225(n) - 1.

Extensions

More terms from Alois P. Heinz, Feb 20 2013

A222292 Least number whose Collatz 3x+1 trajectory contains a number >= 2^n.

Original entry on oeis.org

1, 2, 3, 3, 3, 7, 15, 15, 27, 27, 27, 27, 27, 27, 447, 447, 703, 703, 1819, 1819, 1819, 4255, 4255, 9663, 9663, 20895, 26623, 60975, 60975, 60975, 77671, 113383, 159487, 159487, 159487, 665215, 1042431, 1212415, 2684647, 3041127, 4637979, 5656191, 6416623
Offset: 0

Views

Author

T. D. Noe, Feb 19 2013

Keywords

Comments

Are the unique values a subset of A006884? - Ralf Stephan, May 27 2013
This sequence is important for the computation of Collatz numbers. It shows that using 32-bit integers, only numbers less than 159487 can have their Collatz trajectory computed.

Crossrefs

Cf. A025586, A222291 (base-10 version).
Cf. A095384.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=1, 1,
          max(n, b(`if`(n::even, n/2, 3*n+1))))
        end:
    a:= proc(n) option remember; local i, t; t:=2^n;
          for i while b(i)Alois P. Heinz, Sep 25 2024

Extensions

a(1) corrected by Kevin Ge, Sep 25 2024
Previous Showing 21-30 of 60 results. Next