Diophantine Representation of the Set of Prime Numbers Author(s): James P. Jones, Daihachiro Sato, Hideo Wada and Douglas Wiens Source: The American Mathematical Monthly, Vol. 83, No. 6 (Jun. - Jul., 1976), pp. 449-464 Published by: Mathematical Association of America Stable URL: http://www.jstor.org/stable/2318339 . Accessed: 27/03/2013 10:39

Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at . http://www.jstor.org/page/info/about/policies/terms.jsp

. JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of content in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms of scholarship. For more information about JSTOR, please contact [email protected].

.

Mathematical Association of America is collaborating with JSTOR to digitize, preserve and extend access to The American Mathematical Monthly.

http://www.jstor.org

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions DIOPHANTINE REPRESENTATIONOF THE SET OF PRIME NUMBERS

JAMES P. JONES, DAIHACHIRO SATO, HIDEO WADA AND DOUGLAS WIENS

1. Introduction.Martin Davis, Yuri Matijasevic, Hilary Putnam and JuliaRobinson [4] [81have proventhat every recursively enumerable set is Diophantine,and hence that the set of prime numbers is Diophantine.From this, and workof Putnam[12], it followsthat the set of primenumbers is representableby a polynomialformula. In thisarticle such a primerepresenting will be exhibitedin explicitform. We prove(in Section2) THEOREM1. The setof prime numbers is identicalwith the set of positive values taken on by the polynomial

(1) (k+2){I- wz+h + q 2-_(gk+2g+k +) (h+j)+h-z [2n+p+q+z-e1

-[16(k + 1)3 (k +2) -(n + 1)2+ 1_-fj2 - [e3 (e +2)(a + 1)2+ 1 _o212 -f(a2'- )y + -x2J2_

(16ry4(a - I)+ i - u212- [((a + u2(U2- a))2- 1)*(n + 4dy)2+ I - (x + cu)2]2- [n + I + v- yj2

- -[(a2- 1)12+1 m2]2-[ai + k + 1-_-i_i]2-p +l(a -n 1)+ b(2an + 2a - n2-2n -2)- mJ'

-[q + y(a -p - 1)+ s(2ap +2a -p2 - 2p - 2)-_xX2 -z + pl(a - p)+ t(2ap_ p2 _ 1)- pml

as thevariables range over the nonnegative . (1) is a polynomialof degree25 in 26 variables,a, b,c,..., z. Whennonnegative integers are substitutedfor these variables, the positive values of (1) coincideexactly with the set of all prime numbers2,3,5,.... The polynomial(1) also takeson negativevalues, e.g., - 76. In 1971,Yuri Matijasevic [10] outlined the construction of a primerepresenting polynomial in 24 variablesand degree 37, using the Fibonacci numbers. In theaddendum to hispaper, an improvement to 21 variablesand degree21 was made.(These polynomialswere not written out explicitly.)Our constructionhere yields a polynomialin 19 variablesand degree29. It also yieldsa polynomialin 42 variablesand degree 5. Thuswe mightask what is thesmallest possible degree and how few variables are actuallynecessary to representprimes? Let us considerfirst the question of the degree. We knowthat a primerepresenting polynomial of degree5 is possible.All thatis necessaryto reducethe degree to 5 is theSkolem substitution method (cf.[3], p. 263).However, this procedure increases the number of variables (to 42 whenapplied to (1)). We do not knowwhether there is a primerepresenting polynomial of degree< 5. The questionof theminimum number of variables is also open.A simpleargument shows that at least2 variablesare necessary.But we do notknow the minimum number. The methodof proofof Theorem1 yieldsa polynomialin 16 variables.To reducethe number of variables below 16 requires an entirelydifferent construction. The best resultwe were able to obtainis a polynomialin 12 variables.We shallprove THEOREM2. Thereexists a primerepresenting polynomial in 12 variables. Thisresult was reportedlyknown to YuriMatijasevic in 1973,although no literatureis available concerningthis. Our proofuses methodsdeveloped by Yuri Matijasevic and JuliaRobinson in [11]. The constructionis carried out in ?3. The polynomialconstructed has verylarge degree. The proofsof Theorem 1 and 2 are bothbased on Wilson'sTheorem. In each case we showthat theset of prime numbers is Diophantine;i.e., that there exists a Diophantineequation solvable only forprime values of a parameter.We constructa polynomial M(k, x1, , xn)with the property that for each nonnegativeinteger k

(3) k + 2 is prime*4 M(k,x1, , x') = 0 is solvablein nonnegative integers. 449

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 450 JONES-SATO-WADA-WIENS [June-July

It willturn out thatM is a sumof squaresand hencenonnegative. From such a nonnegative polynomialM, satisfying(3), a primerepresenting polynomial P is constructibleby themethod of Putnam[12]. We have onlyto set P equal to

(4) (k + 2) 1-M(k, xi, ,)I.t

The difficultyis of coursethe constructionof M. We shallsee thatthis requires nearly all the techniquesinvented to solveHilbert's tenth problem. And there is goodreason why this should be so. Severalyears before Hilbert's tenth problem was solvedin the negativeby Matijasevi6[8], Julia Robinson[16] provedthat if the set of primenumbers was Diophantine,then every recursively enumerableset wouldbe Diophantine.Hence Theorem1 and 2 actuallyimply the unsolvabilityof Hilbert'stenth problem. As was mentionedpreviously, our polynomialstake on negativevalues. Hence it cannotbe claimedthat theyrepresent primes exactly. This is not an accidentalfeature of the Putnam construction.It is a limitationinherent in algebraic functions. The readeris probablyfamiliar with the theoremthat no polynomialcan representonly primes. This theorem is provedin Section4 and the resultis also extendedto all algebraicfunctions of several variables, of which the polynomial is onlya specialcase. To overcomethe inexactness of the polynomial representation, it is necessaryto use exponential functionsor othertranscendental functions. Julia Robinson noticed [4] thatwe mayconveniently employthe Ox forthis purpose, provided we define00 = 1. Ifwe takeM as in (3) thenwe can prove

THEOREM 3. The setof prime numbers is theexact range of a functionof theform

2+ k . OM(k,xl, ,x") in whichM(k, x1, , xn) is a polynomialand n ' 11. Herewe usedthe function Ox to distinguishbetween zero and positiveintegers. We mayalso use the propersubtraction function, absolute value function,remainder function, signum function or integerpart function (but no algebraicfunction). Define r(y, x) to be theremainder after division of y , by x (take r(y,O)=y). Define y-x to be y-x for y-'x and 0 for y

-1 =-,x 1 2l-xl+-x=1-r(1,1+x)=1-sgn(x)=x I+ 1-x = x =1- gnx [1]Li+xi

Indeed,using these more general functions itis easyto givea shortformula for the nth prime, pn. The followingformula is derivedin [7].

n2( ((i) ) (5) Pn = E (1 - r(( - 1)!2,j) n))

The nthprime function may also be representedby a polynomial,though not of coursein one variable.We can prove

THEOREM 4. Thereexists a polynomialP(n, xi, xk) suchthat for any positive integers n and m,

pn = m (3x1,* *, xk){P(n, xi, , Xk)= m}.

Note the apparent paradox. The polynomialP factors!However, the factorsare improper,P = P *1.

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 1976] DIOPHANTINE REPRESENTATION OF THE SET OF PRIME NUMBERS 451

Proof.The proofis a simpleelaboration on Putnam'sidea, (due to Yuri Matijasevic[91). The binaryrelation pn = m is recursiveand hence Diophantineby [41 [8]. Thereforethere exists a polynomialQ suchthat pn = m -* (3x,, ** , xl)Q(n,m i,x,** x,) = 0. We haveonly to putP = xi,?(l- Q2(n,xi+,, xi, * , x,)). (It followsfrom the central result of [11] that we maytake 1 = 13 and hencek = 14.) The Diophantinecharacter of the set of primenumbers has one furtherconsequence which deservesmention. This concerns the problem of proving that a numberis prime.If p is a ,then there is a proofthat p is compositeconsisting of a singlemultiplication. Julia Robinson remarksin [141that prior to thesolution of Hilbert'stenth problem in 1970,it was notknown that therewas a similarproof establishing primality in a boundednumber of steps. Yet itfollows from [4] [81that this is so. And our constructionpermits us to computea boundon thisnumber. THEOREM 5. If p is a primenumber, then there is a proofthat p is primeconsisting of only 87 additionsand multiplications. The numberis easily calculated fromthe equations of Theorem 2.12. 2. Proofof Theorem 1. Throughoutthis paper, all variables are nonnegativeintegers, unlessthe contraryis explicitlystated. We shall use the notationx = l to indicatethat x is a perfectsquare. r(a, b) denotes the remainderof a upon division by b. [x] denotes the greatestinteger x. We shall be concerned with the solutionsof the Pell equation x2- (a2- 1)y2 = 1, for 1-? a.

It is well known[3], [16] thatthe solutions of thisequation, x = Xa(n), y = 4/a (n), can be generatedvia Lucas :

Xa (0) = 1, Xa () = a, Xa(n + 2) =2aXa (n + 1) -Xa(n),

la (0)-0, la (1) = 1, a (n + 2) = 2a4fa(n + 1)- a (n). We shall need the followingproperties of these sequences. n LEMMA2.1. (2a-1) a (n + 1)' (2a) LEMMA 2.2. Oa(n) n(moda-1). Theseproperties are immediateconsequences of thedefinition. Proofs may be foundin [3] and [11].The followinglemma will be usedto forceone unknownto be exponentiallylarger than another. LEMMA 2.3. For 2 c e, thecondition

(2.3) e3(e +2)(n + 1)2+ 1 =E] impliesthat e - 1 + ee-2 < n. Conversely,for any positive integers e and t,it is possible to satisfy 2.3 with n suchthat t|n + 1. Proof.Put a = e + 1. Then (2.3) becomesa Pell equationin (a - 1)(n + 1), i.e.,

(a2- 1)(a - 1)2(n + 1)2+1 = L. = If n is anysolution of (2.3) then(a - 1) (n + 1) 0a(J) forsome j. By Lemma2.2, a - 1 j. Since 0 X j, thisimplies that a - 1

(a - 2) + (a 1)a-3 < n + 1,

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 452 JONES-SATO-WADA-WIENS [June-July

whichgives the result.The conversefollows easily from the followingwell-known fact about Pell equations:When A $ El,the Pell equation Ay2 + 1 = x2always has nontrivial solutions, (cf. [11] ?2). LEMMA2.4. For any numbersp, n and a ' 1 we have thecongruence

Xa(n) p" + tIa(n)(a-p)(mod2ap - p2- 1). Furthermore,when 0 < p" < a, theright side of thecongruence is less thanor equal to theleft side. Fora proofof the asserted congruence see [16]p. 108or [3] p. 242.The assertedinequality is not difficultto deriveusing a- 1 i/(n)

(I) X2=(a2_1)y2+1, (V) b=a+u2(u2-a), (II) u2=(a2-1)v2+1, (VI) s=x+cu, (III) s2 =(b2- 1)t2+ 1, (VII) t= n+ 4dy, (IV) v = 4ry2, (VIII) n ' y. The proofis virtuallyidentical to thatgiven by Davis in [31 so we shall mentiononly the differences.Davis used positiveinteger unknowns in [3],however this is notessential. We need not replacer by r + 1 in equationIV, (to ensurethat 0 < v), sinceif v = 0 thenu = 1 byII, b = 1 byV, s = 1 byIII, x = 1 byI and VI, and y = 0 byI, contradictingVIII. Also,the condition V of [3] was usedonly to showthat b 1 mod4y and b a modu. However,these conditions are guaranteedby II, IV and V above.In thisconnection the proof of sufficiencyis slightly different from that given in [3]. We need notuse theChinese Remainder Theorem. If we eliminatethe unknowns v, b, s and t fromI-VIII, by substitution,then we obtain

COROLLARY2.6. For any numbersa, n and y, (1 ' n) and (2 '- a), in orderthat y = ia (n) it is necessaryand sufficientthat there exist numbers c, d, r, u and x suchthat

(I) x2= (a2 - l)y2 + 1, (III) (x + CU)2 = ((a + U2(U2 - a))2 - 1)(n + 4dy)2+ 1, (II) u2= 16(a2- 1)r2y4+ 1, (IV) n y. We shallalso requiretwo basic inequalities:

LEMMA 2.7. If 0 'a a < lIq, then1-qa? ' (1-a)y. LEMMA 2.8 If O ac-'? 2, then(1-a)-'=) 1 + 2a.

The fundamentaltool in bothconstructions is Wilson's theorem which characterizes the primes in termsof thefactorial function. LEMMA 2.9. (Wilson'stheorem.) For any numberk -1, k + 1 is primeif and onlyif k + 1 k! + 1. For a proofsee [61,p. 68. The nextlemma leads to a Diophantinedefinition of the factorial function.It is statedin [10],in slightlydifferent form, without proof. LEMMA 2.10. Forany positive k, if (2k)" c n and n' < p then

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 19761 DIOPHANTINE REPRESENTATION OF THE SET OF PRIME NUMBERS 453

< k!< (+1)n pkl) k!+ 1.

Proof.Using the BinomialTheorem we have.

1 (p + 1)n -(= i) P + Pk+ (ik)P

k Now (np)k+1 nkpknp_l<-1c(p_l)pknpl=ppkp npp -1 < ppkp ppk =(np 1)ppk. Therefore

E (i)P -E npP np- 1 i< so that

(i) ~~~~~~~~r((p+ 1) I ppk)=E ( i:) i 0. Firstwe provethat

(ii) k!< k n .

(ii) followsfrom the inequalities

k!( (in); k!(k- 1) +(kP k - ! (k( _ )1. k!P

=k! (k ! P ?! pk =k2nk Ipk +nkpk

=(k + k)pk C(1 + n)kpk. It remainsonly to establish

(iii) (n 1)kp k

In consequenceof

+ (+ 1)kp (? l)k (n+1)k (n)k (n) (n ) we see that(iii) willfollow from + (iv) (n k?+k,. (k) To derive(iv) we have onlyto use Lemmas2.7 and 2.8, viz.

(n+ k_k_! ! kk! kk (1 1k 1)< =k k < k= n (n 1-) k k n(k\+k !\\I

k! (n1K ) k! (1 n~~+ k! (i +n2;)~k ~ -)

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 454 JONES-SATO--WADA-WIENS [June-July

UsingLemma 2.10 we may characterizethe factorialfunction in termsof threeexponential functions. LEMMA 2.11. Forany positive integers k and f,in orderthat f = k! itis necessaryand sufficientthat thereexist nonnegative integers j,h, n, p, q, w and z suchthat (I) q=wz?h?j, (IV) p =(n?+1)k,

(III) (2k)3 (2k+2) (n +1)2+ 1=LI1, (VI) Z= pk+1. Proof.Sufficiency. Suppose k,f,j,h, n, p,q,w and z satisfyconditions I-VI. By II and VI, 0

Hence f = k! sincef and k! are integers. Necessity.Suppose 1 -- k and f= k! By Lemma2.3 we maychoose n so that(2k )k -=n and III + = Z holds.Set p = (n 1)k , q (p ? 1)n and = Pk +l ThenIV, V and VI hold.Finally, put w = (q - r(q,z))Iz, h = z - fr(q,z) and j = r(q,z) - h. ThenI and II hold.By Lemma2.10, h and j are nonnegative. Finally,we are able to givea Diophantinedefinition of theset of primenumbers. THEOREm 2.12. Forany number k ?i 1, inorder that k ? 1 beprime it is necessaryand sufficientthat thereexist numbers a, b,c, d, e, f, g, h, i, j, 1, m, n, o, p, q, r,s, t, u, v, w, x, y and z suchthat

(1) q=wz?h+j, (8) (x?cu)2=((a+u2(u'-a)-)2-1)(n+4dy)2+l, (2) z=(gk?g+k).(h+j)+h, (9) m = (a' -1)1P+ 1, (3) (2k)3 (2k+2)(n+1)2?l=f2, (10) l= k?+i(a -1), (4) e =p +q +z +2n, (11) n +I+ v =y, (5) e3(e?+2)(a +1) + 1=o02 (12) m=p?+1 (a -n -1) +b (2 a(n +1) -(n+ 1)-)

(6) x = (a2_-1)y2+ 1, (13) x =q?+y(a -p -1)+ s(2a(p +1)- (p +1)2- 1), (7) u2= 16(a' - 1)ry4 ? 1, (14) pm= z ? pl(a - p) + t(2ap_-p2-_ 1).

Proof.Sufficiency. Suppose thatnumbers a, b,- , z satisfyequations (1)-(14) and that1 ?- k. Equation(3), togetherwith Lemma 2.3, impliesthat (1') 2?--n, and also (2') k < n. Equations(4) and (5), togetherwith Lemma 2.3, implythat (3') p +q + z+2n - +(p +q +z+2n )p+q+z+2n-2 ?

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 19761 DIOPHANTINE REPRESENTATION OF THE SET OF PRIME NUMBERS 455

UsingLemma 2.4 and equation(12) we findthat p (n + 1)k(mod 2a (n + 1) - (n + 1)2- 1). This togetherwith the above inequalitiesimplies that

(5') p=(nl?1)k. From(1') and (3') it followsthat

q

z

UsingLemma 2.4 and equation(14) we findthat Z pk+l(mod2ap _ p2 - 1). This,together with theabove inequalities,implies that

Z = pk+l

Accordingto Lemma2.11, conditions (1), (2), (3), (5'), (6') and (7') implythat gk + g + k = k! and hencethat k! + 1 = (g + 1) (k + 1). Thus k + 1 is primeby Lemma2.9. Necessity.Suppose that 1 ' k and thatk + 1 is prime.By Lemma2.9 we mayfind a numberg so thatk! = gk + g + k. Accordingto Lemma2.11 numbers f, h, j, n,p, q and w maybe chosento satisfy equations(1), (2), (3) and also theconditions

(8') p=(n +1)k, q=(p+ 1) and z=pk+l. Choose e so as to satisfyequation (4). By Lemma2.3 it is possibleto choosenumbers a and o, (a ?-2), satisfying(5). Puty = a (n). Accordingto Corollary2.6 we mayfind numbers c, d, r, u and x satisfyingequations (6), (7) and (8). Put m = Xa (k) and putI = q, (k). Then(9) holds.By Lemma2.2 andthe fact that k ' 0i,(k) for2?c a, we maychoose i satisfyingequation (10). It is trivialto show(by induction)that for 2' a, n + 0ia(n - 1) -' 1ba(n).Using this, and thefact that k < n (whichfollows from(3)), wefind that n + l -' y.Hence it is possibleto choosea numberv satisfying(11). Finally, as in theproof of sufficiency,equations (4) and (5) implythat

(n+1)k

Consequently,by Lemma2.4 and the equations(8'), numbersb, s and t maybe foundso that equations(12), (13) and (14) are satisfied.This completesthe proof of Theorem2.12. Theorem1 now followsimmediately from Theorem 2.12. We have onlyto replacek by k + 1 throughoutthe equations of Theorem 2.12, sum the squares of the equations and employ the device of Putnam[121. This producesthe polynomial (1). Perhapssome industriousreader will construct a shorterprime representing polynomial.

3. Proofof Theorem 2. Here we showthat primes are Diophantinedefinable in 11 unknowns.In Section2 we usedwhat might be calledthe congruence method. In thissection we shalluse whatmight be calledthe ratio method. This latter technique, developed by Yuri Matijasevic and Julia Robinson in [11],is generallymore economical with respect to the numberof variables.

LEMMA3.1. For 0<2q < P, ( ) '

Proof.By Lemmas2.7 and 2.8.

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 456 JONES-SATO-WADA-WIENS [June-July

LEMMA 3.2. For 0 < n < M and O < x, (1M)<(1 2M(X+l)k

Proof.By Lemma 2.7. LEMMA 3.3. If x > 8 2nand n > k, then

(i) Xk [( Xk ] < , (ii) [ =kl (n) mod x, (iii) (n) <(x +v)n

Proof.

(x + =O ()i E ( )i- + nie k where

E (.)x k C i < - < 8. Thus [(k ]E (i)X -( )mod x.

(iii) followsfrom the assumption k < n.

- LEMMA 3.4. nk/() ! (+ 2(k 1)) for n > 2(k 1).

Proof.As in theproof of Lemma2.10, condition (iv).

LEMMA 3.5. a 1- < a + 1, (for a 1).

LEMMA 3.6. a 1- _) > a-2, (fora 1).

DEFINITION3.7. U(x, y) = (x + 2)3(x + 4) (y + 1) + 1. By Lemma2.3, if U(x, y) = O thenxx < y. Also,for each x, arbitrarilylarge numbers y maybe foundsatisfying U(x, y) = O. (Thisis the same functionU(x, y) definedin [11].) = LEMMA3.8. (Matijasevic-Robinson[11]) Suppose A > 1, B > 1 and C > 0. ThenOA (B) C ifand onlyif the following system of conditionscan be-satisfied.

(Al) DFI=LO, FJH-C,B _ C, (A5) G = A + F(F - A), (A2) D=(A2-1)C2+1, (A6) H=B+2(+?1)C, (A3) E = 2(i + l)D(k + 1)C2, (A7) I=(G2 _ 1)H2+ 1. (A4) F=(A2-1)E2?+1

THEOREM 3.9. Forany positive integer k, in orderthat k + 1 be prime,it is necessaryand sufficient thatthe following system of equationshas a solutionin nonnegativeintegers: (I) U(2k,n)= OI, (VI) C=m+B, (II) U(2n,x)=L0, (VII) DFI=Ol,FIH-C, (III) M = 16nx(w + 2) + 1, (VIII) D =(A2- 1)C2+ 1, (IV) A = M(x + 1), (IX) E = 2(i + 1)DC2, (V) B=n+l, (X) F=(A2_1)E2+1, (XI) G = A + F(F - A),

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 1976] DIOPHANTINE REPRESENTATION OF THE SET OF PRIME NUMBERS 457

(XII) H=B+2?+1)C, (XVI) (M2X2- 1)L2 + 1 = El,

(XIII) I = (G2- 1)H2 + 1, (XVII) (M2n2x2- 1)R2+ 1 = El, (XVIII) K = n - k + 1 + p(M- 1), (XIV) R L (XIX) L = k + 1 + I(Mx -1), (XX) R = k + 1 + r(Mnx- 1), (XV) (M2 - 1)K2 + 1 = C, (XXI) S=(z+1)(k+l)-2.

Proofof Sufficiency.Let therebe givena solutionto thesystem (I)-(XXI). We mustshow that k + 1 is prime.By Wilson'sTheorem (Lemma 2.9) itis sufficientto show that k + 11 k! + 1. According to theequation (XXI), k + 1I S + 2, Henceit is sufficientto show that S + 1 = kM.Define real numbers o and, by

KL' ( - R C) ~~(W+ l)x) (1- L

Accordingto (XIV), I(-(S + 1)1<. Hence we need onlyprove that

(1) f3-k!j< 2 From(I) we have,by Lemmas2.3 and 3.7, (2) n > (2k)2k> k, and n ' 5 (II) impliesthat

(3) x > (2n)2 > 8nk. (III) impliesthat (4) M'32nx, and (5) M>2n,M> 160-1010. From(IV), (V) and(VI), A > 1,B > 1 and C ? B > 1. So byLemma 3.8, (VII)-(XIII) implythat (6) C= qM(X+l)(f + 1). (XV), (XVIII) and Lemma2.2 imply (7) K =qM(nf-k+1+p'(M-1)), wherep' 0O, sinceM - 1 > n - k + 1 by (5). (XVI), (XIX) and Lemma2.2 implythat (8) L =qMX(k + 1 + 1'(Mx-1)), where1' 0O sinceMx - 1 > k + 1 by (4) and (2). (XVII), (XX) and Lemma2.2 implythat (9) R = M"x(k+ 1 + r'(Mnx- 1)), wherer' '0 sinceMnx - 1_ k + 1. We now showby contradictionthat p' = I' = 0. If p' > 0 or 1'> 0 then

(2M(x + 1))- r c (2M(x + 1))" - - - (2M 1)+M kl(2Mx - 1)k - (2M 1) (2Mx 1) In eithercase,

< (2M(x + 1))_ (2M) (x + 1) < 1 (2M- 1)M4 (4M(M- 1) + 1)n (2M- 1)M2< 2-

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 458 JONES-SATO-WADA-WIENS [June-July

Hence ,3< 0 contradicting(XIV) (whichimplies that 2 < /). (10) Thus p '=l'=O,K=q=M(n-k+1) and L=qMX(k+1). We thenhave

n + 2M n - c (2M(x 1)) x+l" An (X+ " xk MJ' (2M - l)n-k(2Mx - l)k 2M-11 xk k

by Lemmas 2.7 and 3.1. Also,

>(2M(x + 1)-1)"1 (x + n> (X +n1) () 2( +1) k (1- = (2M)-k (2Mx)k Xk 2M(x + 1) x M by Lemma 3.2. Thus, < (11) | n + an > 1 (x + xk M x k n 2~ Xk

We nextderive bounds for cr - (w + 1)x.

Case 1: Suppose x > or- (w + 1)x. Then (w + 2)x > o. Put El = |- k . Then

(12) = k + ?1 k +1 + 82, whereO < 82 < 8' by Lemma 3.3. And

(13) f (= ) ? e1 + 82(modx), by Lemma 3.3.

From(11) and (III),

_< x1) n n <1 C I < k 'M < 2o -M <8

Sincek + 1 n, we have

n) n(n - 1) (n - k + 1) n k(k - 1) 2k5 n k < ( k(k-1) ...2 =k(k - 1) ... 2 an 3k! Then

+ ? + r- (w 1)x 3 (nk) e1 e2(mod x), whereO<(n)?ei+82<3x+4<2x

(14) 1(w+2 )x =2x and o - (w + 1)x =(k )?e1+e2 (> )- 8 >4, i.e.,

(15) 4 < - -(w + l)x

From (9), we have R = Mnx(k + 1 + r'(Mnx - 1)), where r' 2 0. Suppose r' > 0. Then

- R _ OIMnx (k + Mnx) > (2Mnx - 1)k+Mnu-l _ (2Mnx 1)Mnx

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 1976] DIOPHANTINE REPRESENTATION OF THE SET OF PRIME NUMBERS 459

By (6), C = M(X+l)(n + 1) c (2M(x + 1))n< (2Mnx- 1)n,so C3 < R. Also, C _ (2M(x + 1)- )n > 9, so thatC <3R 2. Thus,

R/(c-~1) c (3R'- 1)< R /(2R 42)-

Since24< o - (w + 1)x by (15),

R < 1 <1 - (a - (W+ l)x) (1 - R) L 4(o (w + 1)x) 2' contradicting(XIV). Thus (16) r' = 0 and R=Mnx(k + 1). It followsfrom this, (3) and(4) that R - (k + 1) < (2MnXk (2Mx)k nk (2Mx)k+l_ _ 1 g< (17) < )24 ,C 4fM(x+l)(+ 1)= (2M(x + 1)-l)n (2Mx)- (2Mx)n (2Mx Also,

(18) (1 - )> 1- so 1)< 11< 2 by (17). (1- Case 2: Supposeo - (w + 1)x ' x. Then o - (w + 1)x >-, so r' = 0, as in Case 1. Also,

o (w +1x)( R 2

x(2Mx 1)- x1+ M by Lemma 3.1, using (3),

4nk 1 x 2 Thus 3< 2, contradicting(XIV). Hence, Case 2 doesnot hold and Case 1 obtains. Nowit is possibleto showthat J (3 - k! I< 2. We have,from Case 1, that

(19) (o-(w+1)x =(=)?+, where 0?e =| +e1+e21<4.

Using(10), (16), (17) and(19) we have

R <. (2MnX)k 1 - (k )4+ )(1 c) L (k ) 1- (/k )) i(1- (2Mx)) (2Mx )k 2 k n 2Mx \k( 1 1

( /(k))( 2Mx-,IX ( /(9))(1-n 1 k (2Mx) It is easilyseen that

2 k 1 < +-28 11 '

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 460 JONES-SATO-WADA-WIENS [June-July

usingLemmas 2.7, 2.8 and3.1. By Lemma3.4, ~~~~~~~~~~ - l nk (n c !( 2(k

Thus

P

(20)

(i) k! (28 (n))<1< (since lOk!k!2E<5(k!)2< k2k? n

(ii) k! (Mx) < (since lOk' k ? 10k" < lOn < Mx),

(iii) k! _)< 1 (by (ii)),

(iv) k 2(k 1 )< 1 (since 20k!(k-1)2l 40kk <(2k)2k

(Theseinequalities are derived using only (2) and(3).) Thus(20) holds Also,

n by2Mn- by (16) and (10), --/X 1A{ _ A>nk 1A{

-k! (1-2Mx)(1-(n)) byLemmas 2.7 and 2.8.

We claimthat (21) f3> k! -4. ByLemma 3.6, the following inequalities are sufficient to establish this.

- k (i) 1 12Mnx- -4 (since 4kk!? 4k2=C 4n <2Mnx)

(ii) 1- 1 4ek!k!(n - k)! < k!k!(n - k)! = k2"(n- k)! = n(n - k)! n!). -{-n --k!4k! (since

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 1976] DIOPHANTINE REPRESENTATION OF THE SET OF PRIME NUMBERS 461

Thus (21) holds.Hence (1) holds.

Proofof Necessity. Suppose k + 1 is a primenumber. We mustfind nonnegative integers satisfying (I)-(XXI). Choose n and x satisfying(I), (II). Let S = k! - 1. Then z existssatisfying (XXI), by Wilson'sTheorem. Define w by[(x + 1)n/xk]= (n)+ (w + 1)x.Let M be givenby (III), A by(IV), B by (V). Put C = O'A(B), and m = C - B. Then (VI)-(XIII) maybe satisfiedby Lemma 3.8. Put K = OM(n - k + 1),L = OI,MX(k+ 1), R = qMnx(k+ 1). Then(XV)-(XX) can be satisfied,by Lemma 2.2. It remainsonly to showthat (XIV) holds.Define ar and ,3 as before.Recall that in theproof of sufficiencyit was shownthat (22) I -k! 1<2. The onlyassumptions used in theargument establishing (22) wereLemmas 2.7, 2.8, 3.1-3.7, equations (I)-(XIII), theconditions (i) K=qM(n-k+1), L=qmx(k+l), R=qmnx(k+i),

(ii) a-(w+1)x (k)e, where oce <4

and the inequalities (iii) 0< o-(w+1)x and (iv) a-(w+1)x

= + = - (23) M 16nx(w 2) 16n k] (k) +x > 6n k- 8- k) +x >16n xk

Hence,using (11) and (23), we see that

07 [~ ~ ]+ ~nn(Xnn)+ - X +(k> 16 (kn 1

Thus (iii) holds.Next we derive(iv). UsingLemma 3.3 (i), (11), (23) and finally(3) we have

o - (w +1)x = -[(x1)]+ (n) < o (X+) +8+ ( ) < n(X +) I+ n(In)

1 1 (n) < + + < X

Thus (iv) holds.This completesthe proofof Theorem3.9. The unknownsM, A, B, C, D, E, F, G,H, I, K, L, R, S eliminatefrom (I)-(XXI) by substitution. Thisleaves 10 unknowns, n, x, w, m, z, i,j, p,1, r, the parameter k, six square conditions, one divisibility conditionand one inequality.These remaining conditions are definablewith one unknown,y, by the relationcombining theorem of [111.Thus we obtaina definitionM, in 11 unknowns.Replacing k by k + 1 in M we obtaina primerepresenting polynomial P = (k + 2) (1 - M2) in 12 variables. A directcalculation, based on [11],shows that M = M6 willhave degree 148864. However, Yuri Matijasevichas recently worked out a moreefficient version of the relation combining theorem. If we supposethat 1 + IA/7i'J V,,then in Mq we mayreplace Wi by Wi= V1I V2 ... Vi,(i = 1,2, ** , q).

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 462 JONES-SATO-WADA-WIENS [June-July

Thuswhen a squarecondition arises from a Pell equation,(a2 - 1)32+ 1 = E, we maychoose any V _ Iaf3 + I/ 1 + 2. Also, ifthe quantities B and C of [11] are non-negative,as theyare here,they need notbe squaredin Mq.These refinementsyield a polynomialM6 of degree13376. Matijasevicalso noticedthat our first two square conditions, (I) and (II), maybe combinedinto one squarecondition

(24) U(2k,n) [((2U(2k, n) -1)2 - 1)(n + 1)2(X + 1)24+ 1]= O. Observethat the first factor of (24) is primeto thesecond. This gives a polynomialMs ofdegree 6848. Hencethe degree of the 12 variable polynomial P is 13697.(Recently Yuri Matijasevic has announced thathe has been able to reducethe number of variablesstill further, from 12 to 10.)

4. Functionsnot formulasfor primes.Many classicaltheorems are knownconcerning the impossibilityofrepresenting primes with certain sorts of functions.Since these results are negative, they,together with the previous, shed considerable light on thequestion of the logical complexity of primerepresenting forms. The oldestresult of thistype is of course.

THEOREM 4.1. A polynomialP(z1, **,Zk), withcomplex coefficients, which takes only prime valuesat nonnegativeintegers, must be constant. Proof.It is not difficultto showthat the coefficientsof an integervalued polynomial must be rationalnumbers. Let 1 be any multipleof the denominatorsof thesecoefficients of P. We are assumingthat P(1,1, ,1) = p is a prime.Then, if n1,n2,' , nk are integers,P(1 + n,lp, 1 + n21pr , 1 + nklp)=P(1, 1,* , 1) modp. Hence, for all n1,n2, *, nk, P(1 + n1lp,1 + n2lp,* 1 + nklp) = p. Thisimplies that P is a polynomialof degree 0. The theoremis proved.(Cf. also [6],p. 18.) Thisresult was extendedto rationalfunctions by R. C. Buck[2]. A rationalfunction is a special case of an algebraicfunction, (cf. [1] forthe definitionof algebraicfunction). We now proceedto extendthe result to all algebraicfunctions. We shallneed

THEOREM 4.2. An integervalued algebraic function W(z1, Z2, * , Zk) is a polynomial. Proof.We considerfirst the case ofan algebraicfunction W = W(z) ofa singlecomplex variable. Supposethat whenever z is a nonnegativeinteger, W(z) is also an integer.Let us temporarilyrestrict z to real values.The pointat infinity,z = Xc,may or maynot be one of thebranch points of the functionW. However,in anycase thefunction has a Puiseuxseries expansion around the point at infinity[19]. This is theLaurent expansion of W = W(t-"/), whereh is theorder of the branch pointat infinityand t = llz is thelocal parameter.In thisPuiseux series

(1) W(z)= E alza18 1=0 a is a fixedrational number and 6 is a fixedpositive . Now,if W = W(z) is integervalued, its first, second, * *, rthdifferences, defined by / W(z) = W(z + 1) - W(z) and Ar+1 W(z) =A&(A&rW(Z)),are also integervalued algebraic functions of z. It is easy to proveby inductionon r that . (2) /rW(n)= f .f W(r)(n+ xx2?+ * +xr)dx,dx2 . . . dxr whereW(r)(z) denotes the rth derivative of thefunction W= W(z). Since8 is positive,W(r)(z) -+0 as z -- oo,for all sufficientlylarge r.Therefore (2) impliesthat /rW(n) -+ 0 as n -- c, forall sufficiently larger. Since ArW(n) is integervalued, this implies that /rW(n) = 0 forall sufficientlylarge n and r. Sincea nonzeroalgebraic function cannot have infinitely many zeroes [17], it follows that for all z and all sufficientlylarge r, Ar W(z) = 0. This impliesthat W(z) is a polynomialin z, forall real z.

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 1976] DIOPHANTINE REPRESENTATION OF THE SET OF PRIME NUMBERS 463

The case ofa complexvariable z is an immediateconsequence of the analytic continuation of the case ofthe real variable, since an algebraicfunction is uniquelydetermined by its values at an infinite numberof arguments[17]. Thegeneral case, that of an algebraicfunction of several complex variables, W(z,, Z2, *, ), now followsfrom the result for one variable.For ifwe replaceall argumentsbut one withnonnegative integers,we obtainan algebraicfunction of a singlevariable

(3) W(ni,,* , ni-,,zi, ni+,,, * , nk). By thepreceding proof, (3) is a polynomialin zi. Since W is algebraic,one can finda polynomial P(zi) (whosedegree is independentof the ni's) suchthat I W(n1, , ni-, zi,ni+1,* , nk) < P(Zi) forall sufficientlylarge zi. This impliesthat for some fixeddi

(4) ddVW(nl, * *. n,-1, Zi,ni+1, , nk ) - o

Derivativesof algebraicfunctions are againalgebraic. Hence (4) impliesthat for all z1, k,Z a W (zl, , Zi-l, Zi,Zi+l,' , k) (5) ~~~~~di .

Now an algebraicfunction has at mosta finitenumber of branchpoints. Hence infinitelymany k-tuples are not branch points of W.Consider the k variableTaylor series expansion of W aboutsuch a point. Plainly,(5) impliesthat this series terminates.W is a polynomialof degree ' di + d2 + ** * + dk. The theoremis proved.

COROLLARY4.3. An algebraicfunction W(zI, Z2,. ., Zk ), whichtakes only prime values at non- negativeintegers, is constant. Thiscorollary follows from Theorems 4.1 and 4.2. It was provedfor k = 1 bya different,p-adic, methodin [181.Negative results about primerepresenting exponential functions have also been obtained[13] [18] [20]. We shallprove a multivariableresult of thistype. THEOREM 4.4. SupposePi(x1, *., x,) and Qi(xl, * , x,) ->0 are polynomialswith integer coeffi- cientsand thata,, a2, * am are positiveintegers. Then, if thefunction m F(X1 **,x.) =E Pi(xi*,x.)a takesonly prime values at nonnegativeintegers, it is constant. Proof.It sufficesto provethe theoremfor the case of a functionof a singlevariable. (For if F(x1, , x,) is constantin each variableseparately, then F(xl, , x4) is constant.)Hence we may supposen = 1. Now ifF(x) takeson infinitelymany prime values p, thenwe maychoose xi suchthat F(x1) = p is relativelyprime to each ai (sincethe ai's arenonzero). By Fermat'stheorem we thenfind thatF(x1 + kp(p - 1)) p modp, and hencethat for every k

(8) F(x1+ kp(p-1))= p.

(Cf. Reiner[131 or Hardyand Wright[61, p. 66.) On theother hand, if F(x) takeson onlya finite numberof prime values, then one ofthese values is takenon infinitelymany times. In eithercase, for someprime p, theequation (9) F(x) = p holdsfor infinitely many nonnegative integers x. It is notdifficult to showthat equation (9) mustthen holdidentically. This completesthe proofof the Theorem.

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions 464 JONES-SATO-WADA-WIENS

It is interestingto compareTheorem 4.4 withTheorem 3 statedin the introduction.

Acknowledgement.The authorswish to thankMartin Davis, Yuri Matijasevic and JuliaRobinson forseveral helpfulsuggestions made duringthe course of this work.

References

1. Lars V. Ahlfors,Complex Analysis,McGraw-Hill, New York, 1953, xi + 247 pp. 2. R. C. Buck, Prime representingfunctions, this MONTHLY, 53 (1946) 265. 3. Martin Davis, Hilbert's tenthproblem is unsolvable, this!MONTHLY, 80 (1973) 233-269. 4. , Hilary Putnamand JuliaRobinson, The decision problemfor exponential Diophantine equations, Ann. of Math., 74 (1961) 425-436. 5. Underwood Dudley, Historyof a formulafor primes,this MONTHLY, 76 (1969) 23-28. 6. G. H. Hardy and E. M. Wright,An Introductionto the Theory of Numbers, Fourth Edition, Oxford UniversityPress, 1960, xvi+ 421 pp. 7. James P. Jones, Formula for the nth ,Canadian Math. Bull., 18 (1975) no. 3. 8. Yuri Matijasevic, Enumerable sets are Diophantine, Doklady Akademii Nauk SSSR, 191 (1970) 279-282. English translation:Soviet Math., Doklady, 11 (1970) 354-358. 9. , Diophantine representationof enumerable predicates, Izvestija Akademii Nauk SSSR. Serija Matematiceskaja,35 (1971) 3-30. English translation:Mathematics of the USSR-Izvestija, 5 (1971) 1-28. 10. -, Diophantine representationof the set of prime numbers,Doklady Akademii Nauk SSSR, 196 (1971) 770-773. English translationwith Addendum: Soviet Math., Doklady, 12 (1971) 249-254. 11. - and JuliaRobinson, Reductionof an arbitraryDiophantine equation to one in 13 unknowns,Acta Arithmetica,27 (1975) 521-553. 12. HilaryPutnam, An unsolvableproblem in numbertheory, Journal of SymbolicLogic, 25 (1960) 220-232. 13. IrvingReiner, Functionsnot formulasfor primes,this MONTHLY, 50 (1943) 619-621. 14. Julia Robinson, Hilbert's tenthproblem, Proc. Sympos. Pure Math., 20 (1971) 191-194. 15. , Existentialdefinability in arithmetic,Trans. Amer. Math. Soc., 72 (1952) 437-449. 16. , Diophantine decision problems, M.A.A. Studies in Mathematics,6 (1969) 76-116 (Studies in NumberTheory, W.J. Leveque, editor). 17. StanislawSaks and AntoniZygmund, Analytic Functions, Second Edition Enlarged,Warsaw 1965,p. 276. 18. Daihachiro Sato and E. G. Straus, P-adic proofof non-existenceof proper primerepresenting algebraic functionsand related problems,Jour. London Math. Soc., (2), 2 (1970) 45-48. 19. Carl L. Siegel, Topics in Complex Function Theory, Vol. 1, InterscienceTracts in Pure and Applied Mathematics,number 25, Wiley, New York, 1969, ix + 186 pp. 20. E. G. Straus, Functionsperiodic modulo each of a of integers,Duke Math. Jour., 19 (1952) 379-395.

JAMES P. JONES AND DOUGLAS P. WIENS, DEPARTMENT OF MATHEMATICS, UNIVERSITY OF CALGARY, CALGARY, ALBERTA, CANADA, T2N 1N4. DAIHACHIRO SATO, DEPARTMENT OF MATHEMATICS, UNIVERSITY OF SASKATCHEWAN, REGINA, SASKATCH- EWAN, CANADA, S4S OA2. HIDEO WADA, DEPARTMENT OF MATHEMATICS, SOPHIA UNIVERSITY, KIOICHO, CHIYODA-Ku, TOKYO, JAPAN.

This content downloaded from 129.2.56.193 on Wed, 27 Mar 2013 10:39:50 AM All use subject to JSTOR Terms and Conditions