Rosser's Theorem

Author

Eric W. Weisstein
February 16, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/NumberTheory/RossersTheorem.nb.

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

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

Plot

<<Utilities`Plot`

With[{pts=50},
Show[
Block[{$DisplayFunction=Identity},
{
Plot[{n Log[n],n(Log[n]+Log[Log[n]]-1)},{n,1,pts},PlotStyle->{Blue,Red},
AxesLabel->TraditionalForm/@{n,(Subscript[p, n])}],
IntegerListPlot[Table[Prime[n],{n,1,pts}],PlotStyle->Black
]
}]
]
]

Original Version

Resolve[ForAll[n,
n>1,
Prime[n]>n Log[n]],
Integers]

And@@Table[Prime[n]>n Log[n],{n,10^5}]//Timing

ListPlot[Table[Prime[n]-n Log[n],{n,1,10^4}],Joined->True,AxesLabel->{n,Prime[n]-n Log[n]},PlotStyle->Red]

Refined Version

Resolve[ForAll[n,
n>1,
Prime[n]>n(Log[n]+Log[Log[n]]-1)
],
Integers]

And@@Table[Prime[n]>n(Log[n]+Log[Log[n]]-1),{n,10^5}]//Timing

ListPlot[Table[{n,Prime[n]-n(Log[n]+Log[Log[n]]-1)},{n,2,10^8,10^4}],Joined->True,AxesLabel->{n,(Subscript[(OverHat[p]), n])-(Subscript[p, n])},PlotStyle->Red]

Fit[Table[{n,Prime[n]-n(Log[n]+Log[Log[n]]-1)},{n,2,10^7,1000}],{1,x},x]//Timing

Fit[Table[{n,Prime[n]-n(Log[n]+Log[Log[n]]-1)},{n,2,10^7,1000}],{x},x]//Timing

Fit[Table[{n,Prime[n]-n(Log[n]+Log[Log[n]]-1)},{n,2,10^8,10^4}],{1,x},x]//Timing

Fit[Table[{n,Prime[n]-n(Log[n]+Log[Log[n]]-1)},{n,2,10^8,10^4}],{x},x]//Timing