%I #14 May 15 2015 15:15:29
%S 1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,1,1,2,1,1,2,1,1,1,2,1,2,1,1,2,1,1,3,1,
%T 2,2,1,1,2,1,1,2,1,1,2,1,1,1,2,2,3,1,1,2,2,1,2,1,1,2,1,1,8,1,3,3,1,1,
%U 2,2,1,2,1,1,2,1,2,2,1,1,2,1,1,2,2,1,2
%N Let n'= odd part of n. If n' is 1 or prime, then a(n)=1; otherwise a(n) is 1+ the number of times the map x -> (3*x+1)' must be applied to n' in order to reach 1 or a prime.
%C Conjecture: for every N>0 there exists n=n(N) such that a(n)>N.
%H Peter J. C. Moses, <a href="/A257743/b257743.txt">Table of n, a(n) for n = 1..2000</a>
%e Let n=9. We have 9'=9; since (3*9+1)'=7, then a(9)=1+1=2.
%t oddPart:=#/2^IntegerExponent[#,2]&;
%t a257743=Map[Length[NestWhileList[oddPart[3#+1]&,oddPart[#],!(PrimeQ[#]||#==1)&]]&,Range[200]] (*_Peter J. C. Moses_, May 07 2015*)
%o (PARI) step(n)=n>>=valuation(n,2);if(isprime(n),1,n)
%o a(n)=my(k=1); while((n=step(n))>1, n=3*n+1; k++); k \\ _Charles R Greathouse IV_, May 15 2015
%Y Cf. A000040, A000265.
%K nonn
%O 1,9
%A _Vladimir Shevelev_, May 07 2015
%E More terms from _Peter J. C. Moses_, May 07 2015