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

Re: [PrimeNumbers] need help

Expand Messages
  • ***********
    http://www.prime-numbers.org/ has a list up to 3297500000s
    Message 1 of 7 , Dec 2, 2005
      http://www.prime-numbers.org/ has a list up to 3297500000s

      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
      > thx
      >
      >
      >
      >
      >
      > Unsubscribe by an email to: primenumbers-unsubscribe@yahoogroups.com
      > The Prime Pages : http://www.primepages.org/
      >
      >
      >
      >
      > ------------------------------------------------------------------------
      > YAHOO! GROUPS LINKS
      >
      > * Visit your group "primenumbers
      > <http://groups.yahoo.com/group/primenumbers>" on the web.
      >
      > * To unsubscribe from this group, send an email to:
      > primenumbers-unsubscribe@yahoogroups.com
      > <mailto:primenumbers-unsubscribe@yahoogroups.com?subject=Unsubscribe>
      >
      > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      > Service <http://docs.yahoo.com/info/terms/>.
      >
      >
      > ------------------------------------------------------------------------
      >
    • Jud McCranie
      ... A sieve of Eratosthenes can generate those pretty quickly. See http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
      Message 2 of 7 , Dec 2, 2005
        At 05:31 PM 12/2/2005, 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

        A sieve of Eratosthenes can generate those pretty quickly. See
        http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
      • Kermit Rose
        From: Burlacu Bogdan Date: 12/02/05 17:31:18 To: primenumbers@yahoogroups.com Subject: [PrimeNumbers] need help could someone please tell me where can i find a
        Message 3 of 7 , Dec 2, 2005
          From: Burlacu Bogdan
          Date: 12/02/05 17:31:18
          To: primenumbers@yahoogroups.com
          Subject: [PrimeNumbers] need help

          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
          thx



          Kermit says:

          Actually it takes very little time to calculate by the sieve method, a large
          number of
          primes.

          The main problem for you will be storing the primes.

          It would probably be best to re-calculate them each time and have some way to encode them into a shorter space.

          [Non-text portions of this message have been removed]
        • 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 4 of 7 , Dec 3, 2005
            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.