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]
LINKS
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
KEYWORD
nonn
AUTHOR
Alessandro Polcini, Oct 10 2018
STATUS
approved