fixed output of algorithm to return first 100 numbers in array of primes up to 1000