For centuries, the study of prime numbers has been regarded as a subject of pure mathematics in number theory. Recently, this vision has changed and the importance of prime numbers increased rapidly especially in information technology, e.g., public key cryptography algorithms, hash tables, and pseudorandom number generators. One of the most popular topics that attract attention is to find a formula that maps the set of natural numbers into the set of prime numbers. However, up to now there is no known formula that produces all primes. In this paper, we use a hybrid evolutionary algorithm, called the Memetic Programming (MP) algorithm, to generate mathematical formulas that produce distinct primes. Using the MP algorithm, we succeeded to discover an interesting set of formulas that produce sets of distinct primes.