Primes to One Trillion
The Gutenberg text The First 100,000 Prime Numbers , EBook #65, lists the primes up to 1,318,699. This somewhat more ambitious version lists the primes up to one trillion (1,000,000,000,000 or 1E12).
Every even integer greater than 2 can be expressed as the sum of two primes .
To make these lists more accessible, I have reformatted them to a size easily manageable by ordinary text editors and viewers--about 55MB. The file names correspond to the range of primes the file contains:
The leading zero digits cause the file names to collate in order of their content. Longer lists can be composed with the DOS copy command. Move the required prime txt files to a temporary directory and use:
copy .txt longList.txt
This is a collection of 10,000 files, occupying about 486GB of disk space in their unzipped native txt format. Since adjacent primes have about 90% identical leading digits, the compressed (zip) versions total 61GB. Each zip file contains 100 txt files.
Do not use Windows Explorer to copy or move large numbers of files at a time. Use DOS copy or xcopy for large copies. I find Beyond Compare (Scooter Software) handy for keeping track of large numbers of files.
The following zip file names denotes the start of a range of primes in billions (1,000,000,000), and covers a range of 10,000,000,000. Each zip file contains 100 txt files, each covering the primes in a range of 100,000,000.
While working with primes, I developed the primec format, a file or array representation for primes that is roughly the same size of the compressed (zipped) txt representation, and supports fast access, both sequential and direct. The exact location of the primality specification of any number in the file (or memory array) is computed with a few instructions and no search.
If you wish to examine and experiment with the C++ programs used to reformat these prime lists and test the Goldbach Conjecture, download the programs.zip package. It contains Generating and Analyzing Prime Numbers , a description of the content and use of these files, including the primec file format.