A275866 Number of semiprimes in {n, f(n), f(f(n)), ...., 1}, where f is the Collatz function.
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, 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, 1, 9, 9, 8, 4, 4, 4, 34, 7, 38, 7, 3, 7, 7, 12, 11, 2, 6, 38
Offset: 1
Keywords
Examples
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.
Links
- Michel Lagneau, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Table[Count[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # != 1 &], k_ /; PrimeOmega@ k == 2], {n, 82}] (* Michael De Vlieger, Aug 11 2016 *)
-
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", "))))
Comments