mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2004-12-03, 18:06   #1
Orgasmic Troll
Cranksta Rap Ayatollah
 
Orgasmic Troll's Avatar
 
Jul 2003

64110 Posts
Default Pretty Pictures

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:
Attached Thumbnails
Click image for larger version

Name:	primedragon.gif
Views:	717
Size:	38.5 KB
ID:	382  

Last fiddled with by Orgasmic Troll on 2004-12-03 at 18:11
Orgasmic Troll is offline   Reply With Quote
Old 2004-12-03, 18:16   #2
Orgasmic Troll
Cranksta Rap Ayatollah
 
Orgasmic Troll's Avatar
 
Jul 2003

641 Posts
Default

Feel free to add your own mathematical pictures
Orgasmic Troll is offline   Reply With Quote
Old 2004-12-03, 19:03   #3
Spherical Cow
 
Spherical Cow's Avatar
 
Nov 2004

22·33·5 Posts
Default

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?
Spherical Cow is offline   Reply With Quote
Old 2004-12-03, 22:18   #4
Zeta-Flux
 
Zeta-Flux's Avatar
 
May 2003

7·13·17 Posts
Default

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
Zeta-Flux is offline   Reply With Quote
Old 2004-12-03, 22:42   #5
Spherical Cow
 
Spherical Cow's Avatar
 
Nov 2004

22×33×5 Posts
Default

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.
Spherical Cow is offline   Reply With Quote
Old 2004-12-03, 23:05   #6
Fusion_power
 
Fusion_power's Avatar
 
Aug 2003
Snicker, AL

11101111112 Posts
Default

TravisT

Methinks you have re-invented the Big Bang! It was done by an ant even!

Fusion
Fusion_power is offline   Reply With Quote
Old 2004-12-04, 02:01   #7
JuanTutors
 
JuanTutors's Avatar
 
Mar 2004

54410 Posts
Default

Quote:
Originally Posted by Spherical Cow
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.
I'll wait for TravisT's response, but my guess would be the second case b/c there are quite a few long lines followed by very small curls.

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.
JuanTutors is offline   Reply With Quote
Old 2004-12-04, 07:34   #8
Orgasmic Troll
Cranksta Rap Ayatollah
 
Orgasmic Troll's Avatar
 
Jul 2003

641 Posts
Default

Quote:
Originally Posted by Spherical Cow
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.
It is the second case. For example, if you had a string of directions where

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]]]
Orgasmic Troll is offline   Reply With Quote
Old 2004-12-04, 07:55   #9
jinydu
 
jinydu's Avatar
 
Dec 2003
Hopefully Near M48

2·3·293 Posts
Default

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
jinydu is offline   Reply With Quote
Old 2004-12-04, 08:11   #10
jinydu
 
jinydu's Avatar
 
Dec 2003
Hopefully Near M48

2·3·293 Posts
Default

Never mind, I take that back. Here's the image for 10000 primes:
Attached Thumbnails
Click image for larger version

Name:	10000 primes.gif
Views:	666
Size:	5.9 KB
ID:	383  

Last fiddled with by jinydu on 2004-12-04 at 08:12
jinydu is offline   Reply With Quote
Old 2004-12-04, 11:42   #11
Orgasmic Troll
Cranksta Rap Ayatollah
 
Orgasmic Troll's Avatar
 
Jul 2003

641 Posts
Default

Quote:
Originally Posted by Spherical Cow
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?
I didn't check on my picture, but I double checked Jinydu's pic and put a circle at the origin. It is actually extremely far right (the x coordinates range from -5893 to 119)

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
Orgasmic Troll is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
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

All times are UTC. The time now is 18:35.


Thu Oct 21 18:35:36 UTC 2021 up 90 days, 13:04, 1 user, load averages: 1.04, 1.18, 1.23

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.