The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A055510 Largest odd prime in sequence obtained in 3x+1 (or Collatz) problem starting at n, or 0 if no such prime is found. 3

%I #15 Jul 16 2022 12:32:02

%S 0,0,5,0,5,5,17,0,17,5,17,5,13,17,53,0,17,17,29,5,0,17,53,5,29,13,

%T 1619,17,29,53,1619,0,29,17,53,17,37,29,101,5,1619,0,43,17,17,53,1619,

%U 5,37,29,29,13,53,1619,1619,17,43,29,101,53,61,1619,1619,0,37,29,101,17,13

%N Largest odd prime in sequence obtained in 3x+1 (or Collatz) problem starting at n, or 0 if no such prime is found.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CollatzProblem.html">Collatz Problem</a>

%H <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a>

%t op[n_]:=Module[{lst=NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#!=1&],m}, m= Max[Select[ lst,PrimeQ]];If[m<3,0,m]]; Array[op,70] {* _Harvey P. Dale_, Apr 30 2011 *)

%Y Cf. A055509, A087272.

%K nonn

%O 1,3

%A _G. L. Honaker, Jr._, Jun 30 2000

%E More terms from Larry Reeves (larryr(AT)acm.org), Aug 09 2001

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 13:40 EDT 2024. Contains 372533 sequences. (Running on oeis4.)