generate prime numbers in an array