Prime Constellation

Author

Eric W. Weisstein
December 4, 2008

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

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

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

Prime Clusters

Select[Prime/@Range[100],!ClusterPrimeQ[#]&]

Ruiz k-tuples

a=3;
n=3000;
e={0,2,6,8};
Do[
If[(∑_(k=1)^(Length[e]))(∑_(i=1)^j)(i^a) Floor[((j+e[[k]])/i)]==Length[e]+(j^a)+(∑_(k=1)^(Length[e]))(∑_(i=1)^j)(i^a) Floor[((j+e[[k]]-1)/i)],
Print[Table[j+e[[k]],{k,Length[e]}]]],
{j,n}]

Prime Constellation Constants

Integrate[(1/((Log[x])^2)),{x,2,x},Assumptions->x>2]/.LogIntegral[x]-LogIntegral[2]:>Li[x]//TraditionalForm

<<Utilities`Simplify`

FullSimplify[Integrate[(1/((Log[x])^3)),{x,2,x},Assumptions->x>2]]/.Log[4]:>2Log[2]/.LogIntegral[x]-LogIntegral[2]:>Li[x]//Expand//TraditionalForm

FullSimplify[Integrate[(1/((Log[x])^4)),{x,2,x},Assumptions->x>2]]/.Log[4]:>2Log[2]/.LogIntegral[x]-LogIntegral[2]:>Li[x]//Expand//TraditionalForm

li[2,n_]:=Evaluate[FullSimplify[Integrate[1/Log[x]^2,{x,2,n}]]]
li[3,n_]:=Evaluate[FullSimplify[Integrate[1/Log[x]^3,{x,2,n}]]]
li[4,n_]:=Evaluate[FullSimplify[Integrate[1/Log[x]^4,{x,2,n}]]]

c[{2}]:=Evaluate[N[2 Product[Prime[n](Prime[n]-2)/(Prime[n]-1)^2//N,{n,2,50000}],10]]
c[{6}]:=2.c[{2}]
c[{2,6}]:=Evaluate[N[9/2 Product[Prime[n]^2(Prime[n]-3)/(Prime[n]-1)^3//N,{n,3,50000}],10]]
c[{4,6}]:=c[{2,6}]
	
p[l_List,n_]:=c[l]li[Length[l]+1,n]

c[{2,6,8}]:=Evaluate[N[27/2 Product[Prime[n]^3(Prime[n]-4)/(Prime[n]-1)^4//N,{n,3,50000}],10]]
c[{4,6,10}]:=2.c[{2,6,8}]

Table[Round[p[{2},10^n]],{n,8}]

Table[Round[p[{6},10^n]],{n,8}]

Table[Round[p[{2,6},10^n]],{n,8}]

Table[Round[p[{4,6},10^n]],{n,8}]

Table[Round[p[{2,6,8},10^n]],{n,8}]

Table[Round[p[{4,6,10},10^n]],{n,8}]

a=Table[0,{6}];
a={80449,159834,11377,11547,1160,2202};
Do[
	If[PrimeQ[n],
		a+={PrimeQ[n+2],PrimeQ[n+6],And@@PrimeQ[n+{2,6}],
				And@@PrimeQ[n+{4,6}],And@@PrimeQ[n+{2,6,8}],And@@PrimeQ[n+{6,12,18}]} /. {False->0,True->1}
	];
	If[Mod[n,10^6]==0,Print[n,". ",a]],
	{n,14330001,10^8}
];
a

b={0};
Do[
	If[PrimeQ[n],
		b+={PrimeQ[n+4]} /. {False->0,True->1}
	];
	If[Mod[n,10^7]==0,Print[n,". ",b]],
	{n,1,10^8}
];
b

Cousin Primes

PrimeTupleQ[l_List,n_Integer?Positive]:=And@@PrimeQ[n+Join[{0},l]]
PrimeTupleList[l_List,k_]:=Position[Table[PrimeTupleQ[l,n],{n,k}],True]//Flatten
p[l_List,n_:1000]:=PrimeTupleList[l,n]

<<EISFormat`

FormatSequence[(Position[Table[CousinPrimesQ[n],{n,3000}],True]//Flatten)+4,
	46132,1,
	Name->"Larger member $p+4$ of cousin primes ($p$, $p+4$).",
	Cross->{23200}]

l=Position[Table[CousinPrimesQ[n],{n,100}],True]//Flatten;
Transpose[{l,l+4}]

Position[Table[CousinPrimesQ[n],{n,100}],True]//Flatten

(Position[Table[CousinPrimesQ[n],{n,100}],True]//Flatten)+4

Sexy Primes

a=Position[Table[SexyPrimesQ[n],{n,1000}],True]//Flatten;

Take[a,30]

Table[{a[[i]],a[[i]]+6},{i,Length[a]}]

FormatSequence[Table[a[[i]]+6,{i,Length[a]}],46117,1,
	Name->"Large member of a sexy prime pair; value of p+6 where (p,p+6) are both prime",
	Cross->{023201}
	]

trip=Position[Table[SexyTripletQ[n],{n,10000}],True]//Flatten

FormatSequence[trip,46118,1,
	Name->"Smallest member of a sexy prime triple; value of p where (p,p+6,p+12) are all prime but p+18 is not",
	Cross->{046119,46120}
	]

FormatSequence[trip+6,46119,1,
	Name->"Middle member of a sexy prime triple; value of p+6 where (p,p+6,p+12) are all prime but p+18 is not",
	Cross->{046118,46120}
	]

FormatSequence[trip+12,46120,1,
	Name->"Largest member of a sexy prime triple; value of p+12 where (p,p+6,p+12) are all prime but p+18 is not",
	Cross->{046118,46119}
	]

quad=Position[Table[SexyQuadrupletQ[n],{n,30000}],True]//Flatten;

FormatSequence[quad,46121,1,
	Name->"Smallest member of a sexy prime quadruplet; value of p where (p,p+6,p+12,p+18) are all prime",
	Cross->{046122,46123,46124}
	]

FormatSequence[quad+6,46122,1,
	Name->"Second member of a sexy prime quadruplet; value of p+6 where (p,p+6,p+12,p+18) are all prime",
	Cross->{046121,46123,46124}
	]

FormatSequence[quad+12,46123,1,
	Name->"Third member of a sexy prime quadruplet; value of p+12 where (p,p+6,p+12,p+18) are all prime",
	Cross->{046121,46122,46124}
	]

FormatSequence[quad+18,46124,1,
	Name->"Last member of a sexy prime quadruplet; value of p+18 where (p,p+6,p+12,p+18) are all prime",
	Cross->{046121,46122,46123}
	]

Doubles

p[{2}]

p[{4}]

p[{6}]

p[{8}]

p[{10}]

FormatSequence[p[{12}],
	46133,1,Name->"p and p+12 are both prime."
			]

Triplets

p[{2,4}]

p[{2,6}]

FormatSequence[p[{2,8},7000],
	46134,1,Name->"p, p+2, and p+8 are prime."
]

p[{2,10}]

FormatSequence[p[{2,12},7000],
	46135,1,Name->"p, p+2, and p+12 are prime."
]

p[{4,6}]

p[{4,8}]

FormatSequence[p[{4,10},7000],
	46136,1,Name->"p, p+4, and p+10 are prime."
]

FormatSequence[p[{4,12},7000],
	46137,1,Name->"p, p+4, and p+12 are prime."
]

FormatSequence[p[{6,8},7000],
	46138,1,Name->"p, p+6, and p+8 are prime."
]

FormatSequence[p[{6,10},7000],
	46139,1,Name->"p, p+6, and p+10 are prime."
]

FormatSequence[p[{6,12},7000],
	46140,1,Name->"p, p+6, and p+12 are prime."
]

p[{8,10}]

FormatSequence[p[{8,12},7000],
	46141,1,Name->"p, p+8, and p+12 are prime."
]