I was thinking to use a dotplot to give a description of prime numbers. On Wolfram website
there is written that each dotplot can be built by
DotPlot[data_] := Module[{m = Tally[Sort[data]]},
ListPlot[Flatten[Table[{#1, n}, {n, #2}] & @@@ m, 1],
Ticks -> {Automatic, Range[0, Max[m[[All, 2]]]]}]
]
I would like to have set of prime numbers on one axis and the natural numbers on the other one. Any idea? In addition, is it possible to realize a coprimality test by Dotplot (see figures below)?
In addition,
I often investigate on Ramanujan primes. Is it possible to apply this procedure to them? I think so but which is the condition I should use? I am trying from several days with no results. According to wolfram references, the basic code from them is the following:
l = Table[PrimePi[x] - PrimePi[x/2], {x, 10^4}]; // Timing
1 + Last[Position[l, #]][[1]] & /@ Range[0, 50]
These two simple lines provide the first 50 Ramanujan primes.