OFFSET
1,1
LINKS
K. D. Bajpai, Table of n, a(n) for n = 1..1444
EXAMPLE
569 is in the sequence because 569*571*577 + 6 = 187466729 and 569*571*577 - 6 = 187466717 are both prime where 571 and 577 are the next two primes after 569.
1531 is in the sequence because 1531*1543*1549 + 6 = 3659253823 and 1531*1543*1549 - 6 = 3659253811 are both prime where 1543 and 1549 are the next two primes after 1531.
MAPLE
KD := proc(n) local a, b, d; a:=ithprime(n)*ithprime(n+1)*ithprime(n+2); b:=a+6; d:=a-6; if isprime(b) and isprime(d) then RETURN (ithprime(n)); fi; end: seq(KD(n), n=1..10000);
MATHEMATICA
c = 0; Do[If[PrimeQ[Prime[n]*Prime[n+1]*Prime[n+2] +6] && PrimeQ[Prime[n]*Prime[n+1]*Prime[n+2] -6], c=c+1; Print[c, " ", Prime[n]]], {n, 1, 500000}];
KD={}; f=Prime[n+1]*Prime[n+2]; Do[p=Prime[n]; If[ PrimeQ[p*f+6] && PrimeQ[p*f-6], AppendTo[KD, p]], {n, 10000}]; KD
Select[Partition[Prime[Range[6000]], 3, 1], AllTrue[Times@@#+{6, -6}, PrimeQ]&][[All, 1]] (* Harvey P. Dale, Oct 29 2022 *)
PROG
(Magma) [p: p in PrimesUpTo(10^5) | IsPrime(t-6) and IsPrime(t+6) where t is p*NextPrime(p)*NextPrime(NextPrime(p))]; // Bruno Berselli, Apr 11 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
K. D. Bajpai, Apr 10 2014
STATUS
approved