This is a known and unsolved problem in Mathematics today. Perhaps, once the Riemann Hypothesis is proven then out of it's proof will come a generating function for prime numbers. However, while we may fit selected groups of primes into some equation, there is no single equation that generates only prime numbers for any arbitrary size of primes.