%I #11 Apr 14 2014 11:22:17
%S 23,31,43,521,1061,2153,3457,4019,4943,5477,6991,7577,8291,8539,10993,
%T 11953,14767,17957,18439,26321,40993,41047,53269,57917,71347,79979,
%U 80989,88997,91499,92269,94561,108457,109111,112019,117671,121763,133103,140407,147073
%N Primes p such that p^2*q^2*r^2 + 12 and p^2*q^2*r^2 - 12 are primes where q and r are next two primes after p.
%C In the expression prime(n)^2 * prime(n+1)^2 * prime(n+2)^2 +/- c, c = 12 is the smallest integer that yields a sequence of such primes. That means for c = 1...11 no such sequence with a large number of primes is obtained.
%H K. D. Bajpai, <a href="/A240725/b240725.txt">Table of n, a(n) for n = 1..1383</a>
%e 23 is prime and appears in the sequence because 23^2 * 29^2 * 31^2 + 12 = 427538341 and 23^2 * 29^2 * 31^2 - 12 = 427538317 are both prime where 29 and 31 are the next two primes after 23.
%e 31 is prime and appears in the sequence because 31^2 * 37^2 * 41^2 + 12 = 2211538741 and 31^2 * 37^2 * 41^2 - 12 = 2211538717 are both prime where 37 and 41 are the next two primes after 31.
%p KD := proc(n) local a, b, d; a:=ithprime(n)^2*ithprime(n+1)^2*ithprime(n+2)^2; b:=a+12; d:=a-12; if isprime(b) and isprime(d) then RETURN (ithprime(n)); fi; end: seq(KD(n), n=1..20000);
%t c=0;Do[If[PrimeQ[Prime[n]^2*Prime[n+1]^2*Prime[n+2]^2+12]&&PrimeQ[Prime[n]^2*Prime[n+1]^2*Prime[n+2]^2-12],c=c+1;Print[c," ", Prime[n]]], {n,1,1000000}];
%t KD = {}; Do[p = Prime[n]; If[PrimeQ[Prime[n]^2*Prime[n + 1]^2*Prime[n + 2]^2 + 12] && PrimeQ[Prime[n]^2*Prime[n + 1]^2*Prime[n + 2]^2 - 12], AppendTo[KD, p]], {n, 10000}]; KD
%Y Cf. A006094, A048880, A051507, A240596, A240715.
%K nonn
%O 1,1
%A _K. D. Bajpai_, Apr 11 2014