Formulae for Primes

Adrian Bowyer


The set of prime numbers is identical with the set of positive values of

as the variables range over the nonnegative integers. This seems superficially implausible because the expression is a product: the (k + 2) term at the start is multiplied by the expression in the curly brackets; but in fact all this means is that, when (k + 2) is not prime the second expresion is 0 or negative, and when it is the second expression must be 1. This result was established in the paper Diophantine Representation of the Set of Prime Numbers by James Jones, Diahachiro Sato, Hideo Wada and Douglas Weins in the American Mathematical Monthly, Volume 83, June-July 1976, pages 449 to 464.

C.P Willans established a formula to test whether any number, x > 1, is prime. It is

where |a| means the greatest integer not greater than a . The function gives the value 1 if x is prime, and 0 if x is composite. Willans then used this to derive a formula for the nth prime number:

These last two results are established in Willan's paper On Formulae for the Nth Prime Number in the Mathematical Gazette Volume 48, pages 413 to 415, 1964.


Check out The Prime Pages