OFFSET
1,1
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..10010
EXAMPLE
a(11) = 113, because its Collatz orbit 340, 170, 85, 256, 128, 64, 32, 16, 8, 4, 2 avoids odd primes.
MATHEMATICA
Select[Range[4, 7500], NoneTrue[Rest@ NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, #, # > 1 &], And[OddQ[#], PrimeQ[#]] &] &] (* Michael De Vlieger, May 18 2023 *)
PROG
(PARI) cm(k) = {while (k>1, k=if(k%2, 3*k+1, k/2); if(isprime(k), break)); k};
for (k=3, 7500, if(cm(k)==2, print1(k, ", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, May 18 2023
STATUS
approved