Andrica's Conjecture

Author

Eric W. Weisstein
September 25, 2007

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

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

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

Plot

<<Utilities`Plot`
<<Utilities`Typesetting`

p=Prime[Range[500]];//Timing

IntegerListPlot[-Subtract@@@Partition[Sqrt/@p,2,1],PlotRange->All,AxesLabel->TraditionalForm/@{n,Subtract@@Sqrt/@Prime/@{n+1,n}}]

Maxima

{#,N[#]}&@Max[-Subtract@@@Partition[Sqrt/@p,2,1]]

p=Prime[Range[10^5]];//Timing

HighWaterMarks[-Subtract@@@Partition[Sqrt/@p,2,1]]

Prime Difference Function

IntegerListPlot[-Subtract@@@Partition[p,2,1],PlotRange->All,AxesLabel->TraditionalForm/@{n,Subtract@@Prime/@{n+1,n}}]

Generalization

Min[FindRoot[#,{x,2},WorkingPrecision->20][[1,2]]&/@((Subtract@@#==-1)&/@(Partition[Prime[Range[1000]],2,1]^x))]

Solve[127^x-113^x==1,x]

Reduce[127^x-113^x==1,x,Reals]