I am trying to generate a plottable semi-prime counting function.
Have tried:
DiscretePlot[Gather[{a = PrimeOmega[Range[100]];
b = PrimeNu[Range[100]];
Count[Transpose[{a, b}], {2, 2}]}
+
{a = PrimeOmega[Range[100]];
b = PrimeNu[Range[100]];
Count[Transpose[{a, b}], {2, 1}]}],{x, 0, 15}, Filling -> Bottom]]
but really have no clue as to where to go from here!
Answer
a = PrimeOmega[Range[100]];
b = PrimeNu[Range[100]];
ListPlot[{Accumulate[Flatten[Inner[If[#1 === #2 === 2, 1, 0] &, a, b, List]] +
Inner[If[#1 === #2 + 1 === 2, 1, 0] &, a, b, List]],
Table[PrimePi[x], {x, 100}]}]
Makes quite a nice comparison
Comments
Post a Comment