prim numbers


Try to calc the first prim numbers up to a limit.
We use the the sieve of Eratosthenes. It is a simple, ancient algorithm for finding all prime numbers up to any given limit.
It does so by iteratively marking as composite (i.e., not prime) the multiples of each prime, starting with the multiples of 2.

The sieve of Eratosthenes is one of the most efficient ways to find all of the smaller primes.
It is named after Eratosthenes of Cyrene, a Greek mathematician.

Eratosthenes search up to as limit with option and start on Zotac

To find realy big primes, we build a Mersenne prim of the form 2 n -1.
Not all numbers are prim, so we check for a given n, if we have really a prim number, using Lucas-Lehmer test.
with n = on Zotac

Rolf LANG - Remsstr. 39 - 71384 Weinstadt | 07:29:17 up 29 days, 9:56, 1 user, load average: 0.09, 0.09, 0.09