← Back to context

Comment by jks

1 day ago

One such representation is a polynomial with integer coefficients in 26 variables given in

https://www.tandfonline.com/doi/abs/10.1080/00029890.1976.11...

which has the curious property that as you substitute nonnegative integers for the variables, the positive values of the polynomial are exactly the set of prime numbers. (The polynomial also yields negative values.)

When put like this, it sounds like the polynomial must reveal something deep about the primes... but it's another cool magic trick. The MRDP theorem (famous for solving Hilbert's 10th problem negatively) implies that this kind of multivariate polynomial exists for exactly those sets of natural numbers that are computably enumerable, so the polynomials could be seen as a really esoteric programming language for set-enumeration algorithms.

More tricks: https://en.wikipedia.org/wiki/Formula_for_primes