Maths - Generate the next Prime Number

Introduction:

This page allows you to generate either one, or a whole list of Prime Numbers, that are larger than a specified number.
Please note that this task requires a lot of time and memory, if you wish to create large lists.
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.
The starting number you provide need not be a Prime - if it isn't Prime, the nearest (smaller) Prime will be calculated and used as the actual starting point.
If you don't want to wait, you can download: the first 250 Thousand Primes as a CSV file, or: the first 250 Thousand Primes as a plain-text file, and the first 250 Thousand Primes as a JSON file All three are just under 2MB in size.

(Show/Hide Information Panel)

Additional Info:

At the time of writing, the largest known prime number is 2^{136,279,841} - 1 (known as M136279841), which has 41,024,320 decimal digits, and which if printed on standard A4 paper (50 lines per page, 75 characters per line), would make a book with 10,940 single-sided pages, and over one metre thick.

It is unlikely that this machine can handle a number as large as this.

Settings

Calculated Prime Numbers:


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.