creates an array of prime numbers up to inputted number