Eratosthenes distributed algorithm