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.

Showing 1-2 of 2 results.

A222641 Number of iterations in Collatz (3x+1) trajectory of n to reach 1 from the highest term.

Original entry on oeis.org

0, 1, 4, 2, 4, 4, 11, 3, 11, 4, 11, 4, 8, 11, 10, 4, 11, 11, 17, 7, 6, 11, 10, 10, 17, 8, 34, 11, 17, 10, 34, 5, 25, 11, 10, 11, 20, 17, 24, 8, 34, 6, 26, 11, 15, 10, 34, 11, 23, 17, 21, 11, 10, 34, 34, 19, 26, 17, 24, 10, 18, 34, 34, 6, 26, 25, 24, 14, 13, 10
Offset: 1

Views

Author

Jayanta Basu, Feb 27 2013

Keywords

Examples

			Collatz trajectory of 5 is 5, 16, 8, 4, 2, 1. Hence, a(5) = 4.
		

Crossrefs

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Table[c = Collatz[n]; Length[c] - Position[c, Max[c]][[1, 1]], {n, 100}] (* T. D. Noe, Feb 27 2013 *)

Formula

a(n) = A006577(n) - A220421(n);

A224303 Numbers n for which number of iterations to reach the largest equals number of iterations to reach 1 from the largest in Collatz (3x+1) trajectory of n.

Original entry on oeis.org

1, 6, 120, 334, 335, 804, 1249, 2008, 2010, 2012, 2013, 6556, 6557, 6558, 6801, 6802, 6803, 7496, 7498, 7500, 7501, 7505, 10219, 22633, 25182, 25183, 27074, 27075, 27864, 27866, 27868, 31838, 31839, 32078, 36630, 36633, 36690, 36691, 36914, 39126, 39344
Offset: 1

Views

Author

Jayanta Basu, Apr 03 2013

Keywords

Comments

For each n here we have A220421(n) = A222641(n).

Examples

			6 is in the list because Collatz trajectory of 6 is {6, 3, 10, 5, 16, 8, 4, 2, 1} and number of steps to reach largest = number of steps to reach 1 from largest = 4.
		

Crossrefs

Cf. A220421, A222641, A224533 (odd n).

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3*# + 1] &, n, # > 1 &]; Select[Range[50000],Position[Collatz[#],Max[Collatz[#]]] == {{(Length[Collatz[#]] + 1)/2}} &]
Showing 1-2 of 2 results.