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.

A217731 Numbers n such that in Collatz (3x+1) trajectory of n, the number of terms < n equals number of terms > n.

Original entry on oeis.org

1, 19, 39, 75, 201, 428, 462, 550, 583, 593, 638, 702, 755, 1486, 2395, 3023, 3583, 3867, 5342, 6998, 7419, 8283, 10367, 10447, 10524, 10567, 10879, 11219, 12379, 13647, 13650, 14252, 14561, 14783, 15230, 15871, 16871, 16875, 17121, 17385, 18046, 19279, 19691
Offset: 1

Views

Author

Jayanta Basu, Mar 26 2013

Keywords

Examples

			19 is in the list because Collatz trajectory of 19 is {19, 58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1} and number of terms < 19 = 10 = number of terms > 19.
		

Crossrefs

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3*# + 1] &, n, # > 1 &]; t = {};Do[If[Length[Select[Collatz[n], # < n &]] == Length[Select[Collatz[n], # > n &]], AppendTo[t, n]], {n, 50000}]; t