OFFSET
1,3
COMMENTS
Number of semiprimes in the trajectory of n under the 3x+1 map (i.e. the number of semiprimes until the trajectory reaches 1).
It seems that about 15% of the terms satisfy a(i) = a(i+1). For example, up to 100000, 15140 terms satisfy this condition.
LINKS
Michel Lagneau, Table of n, a(n) for n = 1..10000
EXAMPLE
a(9)=7 because the trajectory of 9 is 9 -> 28 -> 14 -> 7 -> 22 -> 11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 and the 7 semiprimes of this trajectory are 9, 14, 22, 34, 26, 10 and 4.
MATHEMATICA
Table[Count[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # != 1 &], k_ /; PrimeOmega@ k == 2], {n, 82}] (* Michael De Vlieger, Aug 11 2016 *)
PROG
(PARI) print1(0, ", "); for(n=2, 100, s=n; t=0; while(s!=1, if(bigomega(s)==2 , t=t+1, t=t); if(s%2==0, s=s/2, s=(3*s+1)); if(s==1, print1(t", "))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 11 2016
STATUS
approved