login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A362959
Numbers k such that the Collatz orbit that begins with k does not contain an odd prime afterwards.
1
4, 5, 8, 16, 21, 32, 42, 64, 84, 85, 113, 128, 168, 170, 227, 256, 336, 340, 341, 453, 512, 672, 680, 682, 906, 909, 1024, 1344, 1360, 1364, 1365, 1812, 1813, 1818, 2048, 2417, 2688, 2720, 2728, 2730, 3624, 3626, 3636, 3637, 4096, 5376, 5440, 5456, 5460, 5461, 7248
OFFSET
1,1
LINKS
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