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”).

A216189
Numbers n whose odd Collatz steps (except for 1) are all primes.
0
3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 17, 19, 20, 21, 22, 24, 25, 26, 28, 29, 34, 35, 37, 38, 39, 40, 44, 45, 48, 49, 52, 53, 56, 58, 59, 67, 68, 69, 74, 76, 77, 80, 85, 87, 88, 89, 96, 99, 101, 104, 106, 112, 116, 117, 118, 119, 131, 134, 136, 141, 148, 149
OFFSET
1,1
COMMENTS
Powers of 2 are not included as they don't have odd Collatz steps. The number n itself (if odd) is not counted as an odd step. [Corrected by Jianing Song, Dec 09 2018]
EXAMPLE
7 is in this sequence because 7*3+1 = 22; 22/2 = [11]; 11*3+1 = 34; 34/2 = [17]; 17*3+1 = 52; 52/2 = 26; 26/2 = [13]; 13*3+1 = 40; 40/2 = 20; 20/2 = 10; 10/2 = [5]; 5*3+1 = 16; 16/2 = 8; 8/2 = 4; 4/2 = 2; 2/2 = 1. 11, 17, 13 and 5 are all primes.
15 is not in this sequence because 15*3+1 = 46; 46/2 = [23]; 23*3+1 = 70; 70/2 = 35, which isn't a prime number.
MATHEMATICA
Select[Range[3, 150], And[AllTrue[Select[Rest@ #2, OddQ], PrimeQ], !IntegerQ@ Log2@ #1] & @@ {#, NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, #, # > 2 &, 1, Infinity, -1]} &] (* Michael De Vlieger, Nov 07 2018 *)
CROSSREFS
Sequence in context: A052294 A336101 A267895 * A191916 A254614 A320698
KEYWORD
nonn
AUTHOR
Alessandro Polcini, Oct 10 2018
STATUS
approved