Prime Sieve of Eratosthenes

Pseudo-code
func sieve( integer N ) var a as array of true. a[1] = false for i = 2 to sqrt( N ) if ( a[i] ) for j = 2 * i to sqrt( N ), in steps of i                     a[j] = false end func
 * Sieves up to N.
 * if a[i] is true, then it is a prime.