A240725 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.
23, 31, 43, 521, 1061, 2153, 3457, 4019, 4943, 5477, 6991, 7577, 8291, 8539, 10993, 11953, 14767, 17957, 18439, 26321, 40993, 41047, 53269, 57917, 71347, 79979, 80989, 88997, 91499, 92269, 94561, 108457, 109111, 112019, 117671, 121763, 133103, 140407, 147073
Offset: 1
Keywords
Examples
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. 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.
Links
- K. D. Bajpai, Table of n, a(n) for n = 1..1383
Programs
-
Maple
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);
-
Mathematica
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}]; 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
Comments