Prime Constant

Author

Eric W. Weisstein
August 5, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Constants/PrimeConstant.nb.

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

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

Characteristic Function

Boole[PrimeQ[Range[100]]]

Decimal

N[FromDigits[{Boole[PrimeQ[Range[1000]]],0},2],100]

V6

Sum[(2^(-Prime[k])),{k,∞}]

V7

Sum[(2^(-Prime[k])),{k,∞}]

Numerical

NSum[(2^(-Prime[k])),{k,∞}]

Sum[(2^(-Prime[k])),{k,1000}]//N

High-Water Marks

p=FromDigits[{Boole[PrimeQ[Range[10^7]]],0},2];//Timing

p=FromDigits[{Boole[PrimeQ[Range[5 10^7]]],0},2];//Timing

p=FromDigits[{Boole[PrimeQ[Range[10^8]]],0},2];//Timing

ContinuedFraction[p,20]

{First[#],Last[#]-1}&[HighWaterMarks[ContinuedFraction[p,10^4]]]