ShipperHQ interview question

How would you write a function that inputs an integer and outputs the prime numbers from 2 to N?