login
A257743
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.
2
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, 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, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2
OFFSET
1,9
COMMENTS
Conjecture: for every N>0 there exists n=n(N) such that a(n)>N.
LINKS
EXAMPLE
Let n=9. We have 9'=9; since (3*9+1)'=7, then a(9)=1+1=2.
MATHEMATICA
oddPart:=#/2^IntegerExponent[#, 2]&;
a257743=Map[Length[NestWhileList[oddPart[3#+1]&, oddPart[#], !(PrimeQ[#]||#==1)&]]&, Range[200]] (*Peter J. C. Moses, May 07 2015*)
PROG
(PARI) step(n)=n>>=valuation(n, 2); if(isprime(n), 1, n)
a(n)=my(k=1); while((n=step(n))>1, n=3*n+1; k++); k \\ Charles R Greathouse IV, May 15 2015
CROSSREFS
Sequence in context: A356936 A257990 A369257 * A033272 A324907 A331295
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, May 07 2015
EXTENSIONS
More terms from Peter J. C. Moses, May 07 2015
STATUS
approved