Modified prime generator to use Double.
LOL

Replaced summation of 1 .. n with an actual formula.