The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A219696 Numbers k such that the trajectory of 3k + 1 under the '3x + 1' map reaches k. 2
 1, 2, 4, 8, 10, 14, 16, 20, 22, 26, 40, 44, 52, 106, 184, 206, 244, 274, 322, 526, 650, 668, 790, 866, 976, 1154, 1300, 1438, 1732, 1780, 1822, 2308, 2734, 3238, 7288 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS This sequence seems complete; there are no other terms <= 10^9. - T. D. Noe, Dec 03 2012 If the 3x+1 step is replaced with (3x+1)/2, the sequence becomes {1, 2, 4, 8, 10, 14, 20, 22, 26, 40, 44, 206, 244, 650, 668, 866, 1154, 1822, 2308, ...}. - Robert G. Wilson v, Jan 13 2015 LINKS Eric Weisstein's World of Mathematics, Collatz Problem Wikipedia, Collatz conjecture EXAMPLE For k = 4, the Collatz trajectory of 3k + 1 is (13, 40, 20, 10, 5, 16, 8, 4, 2, 1), which includes 4; thus, 4 is in the sequence. For k = 5, the Collatz trajectory of 3k + 1 is (16, 8, 4, 2, 1), which does not include 5; thus, 5 is not in the sequence. MATHEMATICA Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; Select[Range, MemberQ[Collatz[3 # + 1], #] &] (* T. D. Noe, Dec 03 2012 *) PROG (Haskell) a219696 n = a219696_list !! (n-1) a219696_list = filter (\x -> collatz'' x == x) [1..] where    collatz'' x = until (`elem` [1, x]) a006370 (3 * x + 1) -- Reinhard Zumkeller, Aug 11 2014 (Python) def ok(n):     if n==1: return      N=3*n + 1     l=[N, ]     while True:         if N%2==1: N = 3*N + 1         else: N/=2         l+=[N, ]         if N<2: break     if n in l: return 1     return 0 # Indranil Ghosh, Apr 22 2017 (PARI) a006370(n) = if(n%2==0, n/2, 3*n+1) is(n) = my(x=3*n+1); while(1, x=a006370(x); if(x==n, return(1), if(x==1, return(0)))) \\ Felix Fröhlich, Jun 10 2021 CROSSREFS Cf. A014682, A070991, A006370, A070165. Sequence in context: A047235 A328588 A287844 * A087505 A086801 A154115 Adjacent sequences:  A219693 A219694 A219695 * A219697 A219698 A219699 KEYWORD nonn,nice,more AUTHOR Robert C. Lyons, Nov 25 2012 EXTENSIONS Initial 1 from Clark R. Lyons, Dec 02 2012 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 29 01:40 EST 2021. Contains 349416 sequences. (Running on oeis4.)