Sieve of Eratosthenes with a binary heap sitting in an array.