OFFSET
1,1
COMMENTS
Up to at least 100000000, every number reaches 1, 5 or 17.
Conjecture : for any x, the iterated process "x ->3x-1" if x is odd or "x ->x/2" if x is even leads to one of the following three cycles: (1, 2), (5, 14, 7, 20, 10), (41, 122, 61, 182, 91, 272, 136, 68, 34, 17, 50, 25, 74, 37, 110, 55, 164, 82). - Benoit Cloitre, May 14 2002
Complement (in N*) of A039500 ; union of A039501 and A039502 (conjectured). - M. F. Hasler, Nov 26 2007
Equivalent to the Collatz ('3n+1') problem for negative integers. - Dmitry Kamenetsky, Jan 12 2017
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
EXAMPLE
Iterations of f starting at 3 are 3,8,4,2,1 - thus 3 is not in the sequence.
Iterations starting at 5 are 5,14,7,20,10,5 -periodic and 1 is not among these values, so 5 is in the sequence.
MATHEMATICA
colln[n_]:= NestWhile[If[EvenQ[#], #/2, 3#-1] &, n, FreeQ[{1, 5, 17}, #] &]; Select[Range[102], colln[#] != 1 &] (* Jayanta Basu, Jun 06 2013 *)
PROG
(PARI) A037084( end=999, n=0 /*starting value -1 */)={ for( i=n, end, n=i; while( n > 17 || n > 5 && n < 17, if( n%2, n=3*n-1, n>>=1)); if( n > 4, print1(i", ")))} \\ M. F. Hasler, Nov 26 2007
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Robert W. Craigen (craigen(AT)fresno.edu)
EXTENSIONS
More terms from Christian G. Bower, Feb 15 1999
Edited by M. F. Hasler, Nov 26 2007
STATUS
approved