Determine Prime Number with the Sieve of Eratosthenes
- Algorithm in Java
Copyright © 2009 Lars Vogel
| Revision History |
|---|
| Revision 0.1 | 17.05.2009 | Lars Vogel |
| Created |
Abstract
This article describes the calculation of prime numbers with
the sieve of Eratosthenes in Java
A prime is an integer greater then one whole only positive
divisors are one and itself.
The prime counting function for a number N (also known as
pie(N)) is the number of primes less or equal to N.
The following algorithm determines all prime numbers until a
certain value.