Student Support Forum: 'Prime Spiral' topicStudent Support Forum > General > Archives > "Prime Spiral"

 < Previous Comment Help | Reply To Comment | Reply To Topic
 Author Comment/Response Bill Simpson 08/23/12 12:18pm Is one of these what you are looking for? In[1]:= n=20; (*Create list of first n primes*) primes=Select[Range[Prime[n]],PrimeQ]; (*Display the points*) Show[ Graphics[Table[Point[primes[[i]]*{Cos[(i-1)*Pi/2],Sin[(i-1)*Pi/2]}],{i,Length[primes]}]] ] <<>> In[4]:= n=20; (*Create list of first n primes*) primes=Select[Range[Prime[n]],PrimeQ]; (*Display the points with connecting lines*) Show[ Graphics[Table[Point[primes[[i]]*{Cos[(i-1)*Pi/2],Sin[(i-1)*Pi/2]}],{i,Length[primes]}]], Graphics[Line[Table[primes[[i]]*{Cos[(i-1)*Pi/2],Sin[(i-1)*Pi/2]},{i,Length[primes]}]]] ] <<>> Try substituting n=1000 and stretch the graphic so it is large enough to not just be a black blob. URL: ,

 Subject (listing for 'Prime Spiral') Author Date Posted Prime Spiral Chris 08/22/12 6:16pm Re: Prime Spiral Bill Simpson 08/23/12 12:18pm
 < Previous Comment Help | Reply To Comment | Reply To Topic