Substituted prime generation function for a more optimized one in Utils