 There is no known efficient formula for primes.For example, there is no non-constant polynomial, even in several variables, that takes "only" prime values.However, there are numerous expressions that do encode all primes, or only primes.