J.P. Jones, Hideo Wada, Daihachiro Sato and Douglas Wiens, Diophantine representation of the set of prime numbers, Amer. Math. Monthly 83 (1976), 449-464. MR 54:2615.

Abstract

In this paper it is proved that the set of prime numbers is exactly the set of positive values of a polynomial of the 25th degree, in 26 variables
as the variables range over the nonnegative integers:

(k+2){1 - [wz + h + j - q]2 - [(gk + 2g + k + 1)(h + j) + h - z]2 -[2n + p + q + z - e]2

-[16(k + 1)3(k + 2)(n + 1)2 + 1 - f2]2 - [e3(e + 2)(a + 1)2 + 1 - o2]2 - [(a2 - 1)y2 + 1 - x2]2

-[16r2y4(a2 - 1) + 1 - u2]2 - [((a + u2(u2 - a))2 - 1) (n + 4dy)2 + 1 - (x + cu)2]2 - [n + l + v - y]2

-[(a2 - 1)l2 + 1 - m2]2 - [ai + k + 1 - l - i]2 - [p + l(a - n - 1) + b(2an + 2a - n2 - 2n - 2) - m]2

-[q + y(a - p - 1) + s(2ap + 2a - p2 - 2p - 2) - x]2 -[z + pl(a - p) + t(2ap - p2 - 1) - pm]2}

Each positive value of the above polynomial is prime. Also each prime is a value of the above polynomial, for some nonnegative integers a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z. Thus the set of prime numbers is identical with the set of positive values of the polynomial.

Another theorem proved in this (1976) paper was that the number of variables in the prime representing polynomial can be reduced to 12 (that the set of primes can be defined in 11 unknowns). This result has been superceded. Primes can be diophantine defined in 9 unknowns. Hence there exists a exists a prime representing polynomial in 10 variables. (See paper 15.)