Prime Quadruplet

Author

Eric W. Weisstein
July 12, 2003

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

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

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

Counts

PrimeQuadrupletQ[p_List]:=PrimeQ/@(And@@p)
PrimeQuadrupletQ[p_Integer]:=PrimeQuadrupletQ[p+{0,2,6,8}]

p+{0,2,6,8}

Timing[Take[q=Select[Prime[Range[PrimePi[10^7]]],PrimeQuadrupletQ],10]]

Table[Count[q,_?(#<=10^n&),{1}],{n,7}]

Rest[FoldList[Plus,0,Table[Count[Range@@Prime/@PrimePi/@{10^(n-1)+1,10^n},_?PrimeQuadrupletQ],{n,6}]]]//Timing

Integrate[1/Log[x]^4,{x,2,x},Assumptions->x>2]

f[x_]:=(1/6) (-Gamma[0,-Log[x]]+((4+2 ((Log[2])^2)+Gamma[0,-Log[2]] ((Log[2])^3)+Log[4])/((Log[2])^3))-((2 x)/((Log[x])^3))-(x/((Log[x])^2))-(x/(Log[x])))

Plot[4.15118f[x],{x,2,100}]

Prime Quadruplets

quads={10^99+349781731,
10^199+21156403891,
10^299+140159459341,
10^399+34993836001,
10^499+883750143961,
10^599+1394283756151,
10^699+547634621251};

PrimeQuadrupletQ/@quads//Timing

PrimeQuadrupletQ/@quads//Timing

Hardy-Littlewood Constant

N[27/2Times@@(#^3(#-4)/(#-1)^4&/@Prime[Range[3,10^4]]),20]//Timing

N[27/2Times@@(#^3(#-4)/(#-1)^4&/@Prime[Range[3,10^5]]),20]//Timing