Plotting Primes This is a double question...


*

*I would like to see a plot of primes such that there are concentric circles, with each circle representing a prime and having its number represented as evenly placed points around the circle.  For example, 


*

*r=2: two dots 180 degrees apart, 

*r=3: three dots 120 degrees apart, 

*r=4: five dots 72 degrees apart.


Surely someone has plotted this before but I can't google it and I don't recognise it if I've already seen it.  Can someone link to one?

*If I need to graph it myself, how can I express this on Wolframalpha or something?
Note: absolute math noob, if it's not obvious!
 A: If you want to plot it using wolfram alpha, find the roots of
$$
(x^2-1)(x^3-1)(x^5-1)(x^7-1) \cdots
$$
See my attempt at 
http://www.wolframalpha.com/input/?i=roots%28%28x^2-1%29*%28x^3-1%29*%28x^5-1%29%29
If you want to plot it yourself, then the points for any prime $p$ are at
$$
(1,0) \\
(\cos(\theta), \sin(\theta)) \\
(\cos(2 \theta), \sin(2 \theta)) \\
(\cos(3\theta), \sin(3\theta)) \\
\cdots \\
(\cos((p-1)\theta), \sin((p-1)\theta))$$
where $\theta = 2 \pi/p$.
If you use octave or something similar, then it is just a nested loop. You may also want to vary the radius by the magnitude of the prime;
Added in response to OP's question:
Here is a program I wrote in octave
phi=0:0.001:2*pi;
c=cos(phi);
s=sin(phi);
hold off;
plot(0,0); % clear the plot
hold on;
pr=primes(25);
for k=1:length(pr)
p=pr(k);
r=k;
t=0:(p-1);
theta=2*pi/p;
plot(r*c,r*s,':');
plot(r*cos(t*theta), r*sin(t*theta), 'o');
end
axis('off');
axis('square');
hold off;
print('-djpeg', 'primes.jpg');

The above program produced the following plot:

A: Here is a Mathematica function that should do what you want:

PrimeCircles[n_] :=
 Show[Table[Graphics[Circle[{0, 0}, k]], {k, 1, n}], Table[Table[
 Graphics[{PointSize[Large], Point[{k Cos[2 Pi j/Prime[k]], 
 k Sin[2 Pi j/Prime[k]]}]}], {j, 0, Prime[k] - 1}], {k, 1, n}]]

So for example, PrimeCircles[5] produces

Unfortunately, the ability to use something like this is not available in Wolfram Alpha.
Here is an animation of PrimeCircles[n] for n from 1 to 20:

Or, if you prefer the sizes of the circles to remain constant in the animation,

A: Here is a version without the circles.  
You can see it better here: http://i.stack.imgur.com/tqXTT.png
Made with processing.org.

