This page allows you to generate a list of Prime Numbers, as a series, or one-by-one.
You may choose between a numbered list, or an unformatted sequence of results.
Both will have exactly the same entries.
Please note that this task requires a lot of memory to run.
The actual computation is carried out indirectly using a variation on an ancient Greek method known as "The Sieve of Eratosthenes": a list of non-prime numbers is produced by generating a set of multiplication tables from the known primes (there is no need to list multiples of the non-prime numbers)
and then cross-checking each integer in sequence to see if it exists in the non-prime list.
Click on any of the links at the top of the page to reveal (or hide) more information about this calculator.
If you don't want to wait, you can download the first One-Hundred Thousand prime numbers as a text file, or the first 100k Primes as a CSV file that you can open in Excel, Numbers or any other spreadsheet program, such as Libre Office Calc
Caveats:
This technique works relatively quickly for small to medium sized lists, but is not very efficient for calculating single, large Prime numbers, for which a number of formulae exist.
As the Prime numbers get larger, the length of both lists get longer, and the average size of the contents also increases, meaning that if the list of Primes gets ten times longer, the amount of storage (computer memory) required gets approximately fifty times larger.
Due to a limitation in Javascript, numbers larger than about 2,000,000,000 need to be displayed in 'Scientific Notation' or 'Exponential Notation' as it is sometimes known, so even if your PC has enough memory to calculate lists that large, the results will no longer be useful beyond that point.
If you are reading this paragraph, then you probably don't have JavaScript installed/enabled on your computer.
At this point in time the calculators on this site are entirely dependent on JavaScript.
Given enough time and money it is hoped to develop a version in the future which will be able to operate independently.
Since JavaScript runs on your own computer, rather than on this server, it has been possible to set up this site much more quickly than if a server-side language was used, and it is possible to serve far more pages with the available bandwidth.
If you think that you can assist with this project in any way, then please visit the Support section and leave a message.
Definitions:
A prime number is an integer that cannot be divided exactly by any integer other than itself or one.
Zero, one, two and three are all special cases, due to their small size.
Zero is never considered Prime, since it cannot possibly be divided by any other number.
One and Two are both too small to possibly be divided by any other integer.
By convention, One is generally NOT considered Prime, since there are no smaller integers that could be a 'factor'.
Two generally is considered Prime (though not by everyone), making it the only even Prime number.
The only integer available as a factor for Two is of course One, which is specifically excluded in the definition.
This leaves no other possible factors, which is essentially the same situation as for One!
Three is therefore the first non-controversial Prime, but in order to provide maximum compatibility, this list always uses Two as the first Prime number in the generated sequence.
Formulae:
There are many, usually complex, formulae to test whether an integer is Prime, however this list does not depend on any of these, instead relying on an exclusion list.
Instructions
If you change the 'Number of Primes to generate' box, after a list has been generated, the original list will be expanded from where it previously finished.
If you have a very old computer, and choose to calculate a long list, the system may become temporarily unresponsive. If this proves problematic, choose a small number first, then increase gradually. Only new values will be created each time.