adding 'isprime' with memory
data from simulations and plotting