ServiceNow interview question

Write an algorithm to return the first 1000 prime numbers