Levy's Conjecture

Author

Eric W. Weisstein
September 15, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PrimeNumbers/LevysConjecture.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/LevysConjecture.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Attempt to Use Built-In Functions

v5.2

Reduce[13==p1+2p2,{p1,p2},Primes]

Resolve[Exists[p,0==p],Primes]

Resolve[Exists[{p1,p2},0==p1+2p2],Primes]

FindInstance[13==p1+2p2,{p1,p2},Primes]

v6

Reduce[13==p1+2p2,{p1,p2},Primes]

(l=Table[Reduce[n==p1+2p2,{p1,p2},Primes],{n,1,10^3,2}]);//Timing

Take[l,20]//ColumnForm

Take[nsolns=Length/@({ToRules[#]}&/@l),30]

nsolns

ListPlot[nsolns,PlotJoined->True,PlotStyle->Red,AxesLabel->TraditionalForm/@{n,S[n]}]

HighWaterMarks[nsolns]

Resolve[Exists[p,0==p],Primes]

Resolve[Exists[{p1,p2},0==p1+2p2],Primes]

FindInstance[13==p1+2p2,{p1,p2},Primes]

And@@Table[FindInstance[n==p1+2p2,{p1,p2},Primes]=!={},{n,7,10^3,2}]//Timing

And@@Table[FindInstance[n==p1+2p2,{p1,p2},Primes]=!={},{n,7,10^4,2}]//Timing

And@@Table[Reduce[n==p1+2p2,{p1,p2},Primes]=!=False,{n,7,10^4,2}]//Timing

Developer`SetSystemOptions["ReduceOptions"->{"DiscreteSolutionBound"->10^5}];

And@@Table[FindInstance[n==p1+2p2,{p1,p2},Primes]=!=False,{n,7,10^5,2}]//Timing