Prime Number Theorem

Author

Eric W. Weisstein
April 9, 2012

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

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

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

Plot

V5

<<Graphics`Colors`
<<Utilities`Typesetting`

Show[Block[{$DisplayFunction=Identity},
{
Plot[LogIntegral[x]-LogIntegral[2],{x,0,1000}],
Plot[x/Log[x],{x,2,1000},PlotStyle->Red],
Plot[x/(Log[x]-1.08366),{x,1,1000},PlotStyle->Green],
ListPlot[Table[PrimePi[n],{n,1000}],PlotJoined->True,PlotStyle->Blue]
}],AxesLabel->TraditionalForm/@{n,PrimePi[n]},
Epilog->{
Text[TraditionalForm[Li[n]],{1075,180}],
{Blue,Text[TraditionalForm[PrimePi[n]],{1065,165}]},
{Red,Text[TraditionalForm[n/Log[n]],{1065,141}]},
{Green,Text[TraditionalForm[n/(Log[n]-1.08366)],{1320,171}]}
},
PlotRange->{{-20,1500},{-5,190}}
]

V6

Show[
{
Plot[LogIntegral[x]-LogIntegral[2],{x,0,1000}],
Plot[x/Log[x],{x,2,1000},PlotStyle->Red],
Plot[x/(Log[x]-1.08366),{x,1,1000},PlotStyle->Green],
ListPlot[Table[PrimePi[n],{n,1000}],Joined->True,PlotStyle->Blue]
},AxesLabel->{n,PrimePi[n]},
Epilog->{
Text[TraditionalForm[Li[n]],{1075,180}],
{Blue,Text[TraditionalForm[PrimePi[n]],{1065,165}]},
{Red,Text[TraditionalForm[n/Log[n]],{1065,141}]},
{Green,Text[TraditionalForm[n/(Log[n]-1.08366)],{1320,171}]}
},
PlotRange->{{-20,1500},{-5,190}}
]

Other Versions

(n/(B+A ln n))

With[{A=1,B=-1.08366},
Series[(n/(A Log[n]+B)),{n,∞,3}]]

Series[(n/(A ln+B)),{ln,∞,3}]/.ln->Log[n]

(n/(ln n))

Series[(n/(Log[n])),{n,∞,2}]

Li(n)

v5.0

Series[LogIntegral[n],{n,Infinity,2}]

v6.0

Series[LogIntegral[n],{n,Infinity,5}]//Normal//TraditionalForm

Sum[k! n/Log[n]^(k+1),{k,0,3}]