Optimizing eratosthene