![]() |
![]() |
#1 |
Cranksta Rap Ayatollah
Jul 2003
641 Posts |
![]()
A while back I was playing with Ulam's spiral and wondered what it would look like if you had an "ant" that would walk in a straight line and turn left when it had walked a prime number of units. I plugged it into Mathematica and ran it up to 50,004 primes. The resulting picture reminds me of a dragon fractal. I doubt it has much mathematical value, but it's in interesting picture:
Last fiddled with by Orgasmic Troll on 2004-12-03 at 18:11 |
![]() |
![]() |
![]() |
#2 |
Cranksta Rap Ayatollah
Jul 2003
641 Posts |
![]()
Feel free to add your own mathematical pictures
|
![]() |
![]() |
![]() |
#3 |
Nov 2004
21C16 Posts |
![]()
Nifty idea; so at twin primes, your ant does an abrupt about-face. Is the ant's starting point roughly in the center of the plot, or is there kind of a bias in one direction or another that eventually dominates?
|
![]() |
![]() |
![]() |
#4 |
May 2003
7×13×17 Posts |
![]()
TravisT,
I have Mathematica but am not that good with it yet. Would you be willing to provide the code you used to get that picture? Thanks, Zeta-Flux |
![]() |
![]() |
![]() |
#5 |
Nov 2004
22·33·5 Posts |
![]()
In re-reading this, I think I assumed wrong about how you were doing it. Was the distance that your ant moved each time equal to the next largest prime number, or the difference between the next prime number and the last prime? In the second case, twin primes would produce an about-face, but not the first.
|
![]() |
![]() |
![]() |
#6 |
Aug 2003
Snicker, AL
95910 Posts |
![]()
TravisT
Methinks you have re-invented the Big Bang! It was done by an ant even! Fusion |
![]() |
![]() |
![]() |
#7 | |
Mar 2004
7658 Posts |
![]() Quote:
P.S. That picture looks cool. I would love to see what it looks like if you kept going. I also wouldn't mind seeing that code, just for fun. |
|
![]() |
![]() |
![]() |
#8 | |
Cranksta Rap Ayatollah
Jul 2003
12018 Posts |
![]() Quote:
U = up one unit D = down one unit R = right one unit L = left one unit then it would start out UULDDRRUUUULLDDD... The Mathematica code I used (and I don't claim to be any good, I just hacked this out) is: ptslist = {{0, 0}, {0, 2}}; pt = {0, 2} For[i = 1, i < 50000, i = i + 4, pt = pt - {Prime[i + 1] - Prime[i], 0}; ptslist = Append[ptslist, pt]; pt = pt - {0, Prime[i + 2] - Prime[i + 1]}; ptslist = Append[ptslist, pt]; pt = pt + {Prime[i + 3] - Prime[i + 2], 0}; ptslist = Append[ptslist, pt]; pt = pt + {0, Prime[i + 4] - Prime[i + 3]}; ptslist = Append[ptslist, pt]]; Show[Graphics[Line[ptslist]]] |
|
![]() |
![]() |
![]() |
#9 |
Dec 2003
Hopefully Near M48
2·3·293 Posts |
![]()
Admittedly, Mathematica 4 seems to behave oddly on my computer some times. It seems to have some kind of computation threshold, and if I cross that threshold, it just keeps calculation seemingly forever... I've asked to compute 100000 such primes, and it just seems to keep evalutaing indefinitely.
Last fiddled with by jinydu on 2004-12-04 at 07:59 |
![]() |
![]() |
![]() |
#10 |
Dec 2003
Hopefully Near M48
2·3·293 Posts |
![]()
Never mind, I take that back. Here's the image for 10000 primes:
Last fiddled with by jinydu on 2004-12-04 at 08:12 |
![]() |
![]() |
![]() |
#11 | |
Cranksta Rap Ayatollah
Jul 2003
641 Posts |
![]() Quote:
I thought it might be due to the Chebyshev Bias: http://mathworld.wolfram.com/ChebyshevBias.html but it's very late and I'm not sure |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Primes as pictures | pepi37 | Programming | 13 | 2017-07-28 03:06 |
Pretty Fast Primality Test (for numbers = 3 mod 4) | tapion64 | Miscellaneous Math | 40 | 2014-04-20 05:43 |
Pretty Result | R.D. Silverman | Cunningham Tables | 2 | 2009-06-19 01:39 |
Projected Pictures. | mfgoode | Puzzles | 18 | 2007-09-21 08:06 |
Pretty Progress Pictures | Joe O | Prime Sierpinski Project | 3 | 2007-06-02 21:28 |