Find all prime numbers from 0 to n. Two implementations.