Bloomberg interview question

3. Write a function to find all primes between 1 to N