Sunday, June 24, 2007

Two billion primes

Differences between consecutive primes (from 3) encoded as in ASCII as c=(p2-p1)/2-1 then compressed with gzip. Numbers up to 49,392,123,905 are sieved, yielding 2,094,974,026 primes (including 2). Confirmed at the Nth prime page. We used a 32-bit machine with 3GB RAM. The encoding scheme is safe, as the first gap of 512 or more happens at 304,599,508,537 (prime #11,992,433,550) (304599508537 11992433550), although multiple-of-three stepping stones could have been used if they were needed. Source and compressed data are here. Sieves are hard to write. Just download and do some addition.

No comments :