Recursive sieve implemented