login
Odd numbers n such that the largest odd term in Collatz(3x+1) trajectory of n is prime.
1

%I #7 Apr 30 2013 12:13:09

%S 3,5,7,9,11,13,15,17,19,23,25,29,35,37,39,53,59,61,67,75,79,87,89,99,

%T 101,105,113,115,119,131,149,153,157,173,179,181,187,197,211,219,229,

%U 241,247,249,255,267,269,277,281,307,317,329,349,371,373,383,397

%N Odd numbers n such that the largest odd term in Collatz(3x+1) trajectory of n is prime.

%H Reinhard Zumkeller, <a href="/A225105/b225105.txt">Table of n, a(n) for n = 1..10000</a>

%e 15 is in the list since highest odd number in Collatz trajectory of 15 is 53, a prime.

%t Coll[n_]:=NestWhileList[If[EvenQ[#],#/2,3*# + 1] &,n, #>1&];t={};Do[If[PrimeQ[Max[Select[Coll[n],OddQ]]],AppendTo[t,n]],{n,1,300,2}];t

%o (Haskell)

%o a225105 n = a225105_list !! (n-1)

%o a225105_list = filter

%o ((== 1) . a010051' . maximum . filter odd . a070165_row) a005408_list

%o -- _Reinhard Zumkeller_, Apr 30 2013

%Y Cf. A087232.

%Y Cf. A010051, A070165, A005408, A220237, A025586.

%K nonn

%O 1,1

%A _Jayanta Basu_, Apr 28 2013