renamed, take number of primes as input
allow user to specify number of processes and size of memory to be allocated