Twin Primes Constant

Author

Eric W. Weisstein
December 9, 2014

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

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

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

Numerical Values

(Subscript[Π, 2])==(∏_p)(1-(1/(((p-1))^2)))

NProduct[1-(1/(((Prime[n]-1))^2)),{n,2,∞}]//Quiet

Finite Sum

N[Times@@((1-1/(#-1)^2)&/@Prime/@Range[2,10000]),20]//Timing

Wynn

SequenceLimit[N[FoldList[Times,1,((1-1/(#-1)^2)&/@Prime/@Range[2,1000])],200]]

v5.2

NProduct[1-(1/(((Prime[n]-1))^2)),{n,2,∞}]//Timing

v6

NProduct[1-(1/(((Prime[n]-1))^2)),{n,2,∞}]//Timing

V7

Product[1-(1/(((Prime[n]-1))^2)),{n,2,∞}]//Timing

(Subscript[Π, 2])=(∏_p)((p(p-2))/(((p-1))^2))

N[Times@@((#(#-2)/(#-1)^2)&/@Prime/@Range[2,10000]),20]//Timing

(Subscript[Π, 2])=Exp[(∑_p)log(((p(p-2))/(((p-1))^2)))]

N[Exp[Plus@@(Log[#(#-2)/(#-1)^2]&/@Prime/@Range[2,10000])],20]//Timing

Exp[SequenceLimit[FoldList[Plus,0,Log[#(#-2)/(#-1`1000)^2]&/@Prime/@Range[2,5000]]]]

(Subscript[Π, 2])=Exp[(∑_p)log(1-(2/p))-2log(1-(1/p))]

(∏_(n=2)^∞)(((ζ(n) (1-(2^(-n)))))^(-I(n)))

i[n_]:=i[n]=1/n Plus@@Function[d,MoebiusMu[d]2^(n/d)]/@Divisors[n]

Table[i[n],{n,20}]

A001037

N[Product[(((Zeta[n](1-(2^(-n)))))^(-i[n])),{n,2,10}],20]//Timing

N[Product[(((Zeta[n](1-(2^(-n)))))^(-i[n])),{n,2,20}],20]//Timing

N[3/4 15/16 35/36Product[(((Zeta[n](1-(2^(-n)))(1-(3^(-n)))(1-(5^(-n)))(1-(7^(-n)))))^(-i[n])),{n,2,10}],20]//Timing

3/4 15/16 35/36NProduct[(((Zeta[n](1-(2^(-n)))(1-(3^(-n)))(1-(5^(-n)))(1-(7^(-n)))))^(-i[n])),{n,2,20},WorkingPrecision->20]//Timing

(pi2=3/4 15/16 35/36NProduct[(((Zeta[n](1-(2^(-n)))(1-(3^(-n)))(1-(5^(-n)))(1-(7^(-n)))))^(-i[n])),{n,2,20},WorkingPrecision->30])//Timing

Prepend@@RealDigits[pi2]

3/4 15/16 35/36NProduct[(((Zeta[n](1-(2^(-n)))(1-(3^(-n)))(1-(5^(-n)))(1-(7^(-n)))))^(-i[n])),{n,2,25},WorkingPrecision->30]//Timing

V7

(1/n)DivisorSum[n,MoebiusMu[#](2^(n/#))&]

Table[(1/n)DivisorSum[n,MoebiusMu[#](2^(n/#))&],{n,20}]

Twice

c=FromDigits[{l={6,6,0,1,6,1,8,1,5,8,4,6,8,6,9,5,7,3,9,2,7,8,1,2,1,1,0,0,1,4,5,5,5,7,7,8,4,3,2,6,2,3,3,6,0,2,8,4,7,3,3,4,1,3,3,1,9,4,4,8,4,2,3,3,3,5,4,0,5,6,4,2,3,0,4,4,9,5,2,7,7,1,4,3,7,6,0,0,3,1,4,1,3,8,3,9,8,6,7,9,1,1,7,7,9},0}]SetPrecision[2,Length[l]]

Value

Times Another way

prod=N[1,25];
(Monitor[Do[prod*=With[{p=Prime[k]},1-(1/(((p-1))^2))],{k,2,10^6}],{k,prod}];prod)//Timing

Series

Series[Log[1-(1/(((p-1))^2))],{p,∞,10}]

SeriesCoefficient[Log[1-(1/(((p-1))^2))],{p,∞,n}]//FullSimplify

Table[((2-(2^n))/n),{n,2,10}]

Exp[Sum[((2-(2^n))/n)(-(2^(-n))+PrimeZetaP[n]),{n,2,20}]]//N//Chop

Cancel[Expand[((2-(2^n))/n)(PrimeZetaP[n]-(2^(-n)))]]

Expand[((2-(2^n))/n)(PrimeZetaP[n]-(2^(-n)))]//FullSimplify

Block[{$MaxExtraPrecision=1000},Accumulate[Table[((2-(2^n))/n)(-(2^(-n))+PrimeZetaP[n])//N[#,50]&,{n,2,10}]]]//Chop

Exp[Last[%]]

PrimeZetaP from Series

ser=Series[Log[1-(1/(((p-1))^2))],{p,∞,2010}][[3]];

Block[{$MaxExtraPrecision=1000},
sums=Exp[Accumulate[N[Table[ser[[k]](-2^-(k+1)+ PrimeZetaP[k+1]),{k,2000}],500]]]
];//Timing

ListPlot[Log10[Abs[Last[sums]-sums]]]

Abs[sums[[-1]]-sums[[-2]]]

N[Last[sums],-Log10[Abs[sums[[-1]]-sums[[-2]]]]-2]

-Log10[Abs[sums[[-1]]-sums[[-2]]]]-2