Solve #10 with a better prime generator