Code snippet that produces N prime numbers (where N is determined by the caller).