Solves problem 6.
Initialize the prime generator.