Display program code

primes2.pl : Prime numbers (faster variant)
Generate prime numbers by Sieve of Eratosthenes.
By generating candidates in ascending order, inappropriate ones are sorted out earlier, so fewer candidates are checked against others.

How to use:
For an integer N, you enter upto(N),
and get all primes P1,P2,..,Pm up to N prime(P1), prime(P2), prime(Pm).

Program: Change the code, then submit!

Console: Enter query or select example from below, then submit and wait for answer!

Select example query: 

CHR
WebCHR help - CHR Website - (c) Copyrights Martin Kaeser Uni Ulm 2007