login
Semiprimes s such that both s + 3 and s - 3 are primes.
0

%I #8 Nov 05 2017 14:00:45

%S 10,14,26,34,86,106,134,194,226,254,274,314,334,386,446,566,974,1094,

%T 1126,1226,1234,1286,1294,1486,1546,1874,2066,2374,2386,2554,2854,

%U 2906,2966,3086,3166,3254,3326,3466,3694,4054,4286,4594,4786,4874,4934,4954

%N Semiprimes s such that both s + 3 and s - 3 are primes.

%C 2*5=10-+3->7,13 primes,...

%t f[n_]:=Last/@FactorInteger[n]=={1,1};lst={};Do[If[f[n]&&PrimeQ[n-3]&&PrimeQ[n+3],AppendTo[lst,n]],{n,0,4*7!}];lst

%t Select[Range[5000],PrimeOmega[#]==2&&AllTrue[#+{3,-3},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Nov 05 2017 *)

%Y Cf. A125215, A125216

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Apr 09 2010

%E Definition corrected by _Zak Seidov_, May 06 2013