Solve problem 5 using Java.
Improve accuracy/perf of Python's prime generator.