List of Primes

Started by
33 comments, last by UraniumRod 23 years, 11 months ago
Any one interested in a large list of prime numbers?
------------------------------"My sword is like a menacing cloud, but instead of rain, blood will pour in its path." - Sehabeddin, Turkish Military Commander 1438.
Advertisement
Goto www.mathworld.com and search for List of Primes.

And then, do the freedom dance as you eat snickers!
OldManDave.

Edited by - OldManDave on 4/29/00 2:27:54 PM
I''m only interested in a large list of primes if the list has all of ''em. The lists I''ve seen start out well, but give up before the last one.

Is it really that hard to make a list of all of ''em?!

(my byline from the Gamedev Collection series, which I co-edited) John Hattan has been working steadily in the casual game-space since the TRS-80 days and professionally since 1990. After seeing his small-format games turned down for what turned out to be Tandy's last PC release, he took them independent, eventually releasing them as several discount game-packs through a couple of publishers. The packs are actually still available on store-shelves, although you'll need a keen eye to find them nowadays. He continues to work in the casual game-space as an independent developer, largely working on games in Flash for his website, The Code Zone (www.thecodezone.com). His current scheme is to distribute his games virally on various web-portals and widget platforms. In addition, John writes weekly product reviews and blogs (over ten years old) for www.gamedev.net from his home office where he lives with his wife and daughter in their home in the woods near Lake Grapevine in Texas.

Well, duh uh! The prime numbers are hard to find as you go deeper into the number list. I don''t know if the prime numbers ever disappear. Here''s a hint: 2 is the ONLY prime and even number. So, that should cut off the rest of the primes into just odds. And, 1 is not considered a prime number... just in case you didn''t know.

I think there''s some wacky Calculus function that can find all primes given a range. You''d have to check on that at www.mathworld.com, I''m not sure.

OldManDave.
The sequence of primes has been proven to be infinite. There is no "last" prime.
I don't know how accurate this is.. but my old programming teacher said the equation (6n (+-) 1) would find most of the primes (that's 6n+1 and 6n-1). One of our programming assignments was to find the first prime number that equation wouldn't find. In order to make it faster, I used this method that involved arrays (seive of arisophany (spelling?)) to test numbers for primeness. And I ran out of stack space (because of the array size) before I found a prime that that equation wouldn't find (I don't *think* there were any errors in the program logic) (and I'm taking Turbo Pascal 7 for DOS, so the stack was limited size).

So 6n(+-)1 should find all the prime numbers for a HUGE range.

By the way, if I'm wrong, please tell me, because I never was satisfied with that program



------------------------------
Jonathan Little
invader@hushmail.com
http://www.crosswinds.net/~uselessknowledge

Edited by - Qoy on 4/29/00 3:39:59 PM
I need to be less subtle. Did anyone notice the winking smiley in the header of my message?

Jeez.

(my byline from the Gamedev Collection series, which I co-edited) John Hattan has been working steadily in the casual game-space since the TRS-80 days and professionally since 1990. After seeing his small-format games turned down for what turned out to be Tandy's last PC release, he took them independent, eventually releasing them as several discount game-packs through a couple of publishers. The packs are actually still available on store-shelves, although you'll need a keen eye to find them nowadays. He continues to work in the casual game-space as an independent developer, largely working on games in Flash for his website, The Code Zone (www.thecodezone.com). His current scheme is to distribute his games virally on various web-portals and widget platforms. In addition, John writes weekly product reviews and blogs (over ten years old) for www.gamedev.net from his home office where he lives with his wife and daughter in their home in the woods near Lake Grapevine in Texas.

I think 51 is prime. It falls between n = 8 and n = 9.

Edited by - WMiller on 4/29/00 4:32:29 PM
51 = 3*17
Well johnhattan I do believe your joking baised on your post icon . But the list is pritty long right now it has all of the primes up to around 4,000,000 (and growing by about 5-10/s on my 166 upstairs) which isnt really far but the way I find the primes is very inefficient.

Qoy - That method seems to not work in all cases 6(9)+1 = 55. Would it skip some primes? And how HUGE is HUGE?

And if any one knows of a better way to find primes rather than doing a modulus (spelling its the '%' C++ operator) on n by all the numbers between 3 and n/2 and if one of the results is zero than its not prime otherwise it is. I already skip all even numbers.

UraniumRod

Edited by - UraniumRod on 4/29/00 4:54:22 PM
------------------------------"My sword is like a menacing cloud, but instead of rain, blood will pour in its path." - Sehabeddin, Turkish Military Commander 1438.

This topic is closed to new replies.

Advertisement