This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A275866 #7 Aug 12 2016 06:07:58 %S A275866 0,0,2,1,1,3,5,1,7,2,4,3,2,6,6,1,3,7,6,2,2,5,4,3,8,3,38,6,5,6,36,1,9, %T A275866 4,4,7,6,7,12,2,37,2,9,5,4,5,35,3,8,8,8,3,2,38,38,6,11,6,10,6,5,37,36, %U A275866 1,9,9,8,4,4,4,34,7,38,7,3,7,7,12,11,2,6,38 %N A275866 Number of semiprimes in {n, f(n), f(f(n)), ...., 1}, where f is the Collatz function. %C A275866 Number of semiprimes in the trajectory of n under the 3x+1 map (i.e. the number of semiprimes until the trajectory reaches 1). %C A275866 It seems that about 15% of the terms satisfy a(i) = a(i+1). For example, up to 100000, 15140 terms satisfy this condition. %H A275866 Michel Lagneau, <a href="/A275866/b275866.txt">Table of n, a(n) for n = 1..10000</a> %e A275866 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. %t A275866 Table[Count[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # != 1 &], k_ /; PrimeOmega@ k == 2], {n, 82}] (* _Michael De Vlieger_, Aug 11 2016 *) %o A275866 (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", ")))) %Y A275866 Cf. A006577, A078350. %K A275866 nonn %O A275866 1,3 %A A275866 _Michel Lagneau_, Aug 11 2016