ALTEN interview question

Prime numbers, write a function.