%I #8 Jan 20 2016 23:56:28
%S 0,0,2,1,3,1,2,1,4,1,2,3,3,1,2,2,5,3,2,4,4,1,4,2,4,1,2,3,3,4,2,2,6,1,
%T 2,5,5,1,2,2,4,3,5,3,3,1,2,4,7,4,4,4,4,5,2,2,7,1,2,3,3,1,4,3,9,3,2,6,
%U 6,3,2,4,4,1,2,3,3,4,7,5,5,1,6,5,5,1,2
%N Number of steps needed to reach 1 or 2 where a step is x -> 3x+1 if x is odd, or x -> x/2p if x is even, 2p being the smallest semiprime dividing x.
%C Conjecture: all positive integers n not of the form 2^(2m+1) eventually reach 1.
%C This is a variant of the Collatz problem: start with any number n. If n is even, divide it by 2p where 2p is the smallest semiprime dividing n, otherwise multiply it by 3 and add 1.
%C Property: a(2^(2m+1)) = m and the last element of the corresponding trajectory is the number 2.
%C It seems that initially about 17% of the terms satisfy a(i) = a(i+1). For example, up to 1000000, 169961 terms satisfy this condition.
%H Michel Lagneau, <a href="/A266928/b266928.txt">Table of n, a(n) for n = 1..10000</a>
%e a(83)=6 because 83 -> 250 -> 25 -> 76 -> 19 -> 58 -> 1 where:
%e 250 = 3*83 + 1, 25 = 250/2*5, 76 = 3*25 + 1, 19 = 76/2*2, 58 = 3*19 + 1 and 1 = 58/2*29.
%t f[n_]:=Module[{a=n,k=0},While[a>2,k++;If[EvenQ[a],m=1;While[PrimeOmega[Divisors[a][[m]]]!=2,m++];a=a/Divisors[a][[m]],a=a*3+1]];k];Table[f[n],{n,1,100}]
%Y Cf. A006577.
%K nonn
%O 1,3
%A _Michel Lagneau_, Jan 06 2016