#Update# OK - First part of update solved: a = PrimeOmega[Range[1000]]; b = PrimeNu[Range[1000]]; c = Range[1000]; ListLinePlot[{c/Zeta[2] - Accumulate[Flatten[Inner[If[#1 === #2, 1, 0] &, a, b, List]]]}, Filling -> Axis] ![enter image description here][1] ... Just unsure how to modify Artes' count plot. #Old# Sorry Artes, yes - was looking for this kind of thing: a = PrimeOmega[Range[100]]; b = PrimeNu[Range[100]]; ListPlot[{Accumulate[Flatten[Inner[If[#1 === #2, 1, 0] &, a, b, List]]], Accumulate[Flatten[Inner[If[#1 === #2 + 1, 1, 0] &, a, b, List]]], Accumulate[Flatten[Inner[If[#1 === #2 + 2, 1, 0] &, a, b, List]]]}] ![enter image description here][2] [1]: https://i.sstatic.net/PTfOw.gif [2]: https://i.sstatic.net/Lyrjs.gif