Revisiting listing 4.14, storing primes in array and checking primality with the prime array