Loading ...
Sorry, an error occurred while loading the content.

Re: [PrimeNumbers] need help

Expand Messages
  • Alan Eliasen
    ... It would probably take you much longer to post a request and wait for a reply, or to download the list. I just used an intentionally-dumb method to list
    Message 1 of 7 , Dec 3, 2005
    • 0 Attachment
      Burlacu Bogdan wrote:
      > could someone please tell me where can i find a list of the first
      > 1 000 000 000 (1 billion) prime numbers. i need it for a program,
      > but i cannot generate it myself because it would just take too much
      > time

      It would probably take you much longer to post a request and wait for
      a reply, or to download the list. I just used an intentionally-dumb
      method to list those primes, and it took 31 minutes. The file is over
      500 megabytes, or 151 megabytes compressed with bzip2's "best" compression.

      I'm not going to send you the list, but here's the whole Frink program:

      for a = 2 to 1 billion
      if isPrime[a]
      println[a]

      It's left as an exercise to see how to speed this up. Frink can be
      obtained at http://futureboy.us/frinkdocs/

      --
      Alan Eliasen | "It's amazing how much mature wisdom
      eliasen@... | resembles being too tired."
      http://futureboy.homeip.net/ | -- Robert Heinlein
    Your message has been successfully submitted and would be delivered to recipients shortly.