|
|
A189051
|
|
Numbers n such that n+/-2 and n^2+/-2 are all primes.
|
|
2
|
|
|
9, 15, 21, 309, 441, 1611, 2955, 3081, 3879, 5529, 7209, 7755, 7875, 13761, 15015, 15729, 16659, 21561, 22155, 35595, 37059, 38199, 45291, 50049, 51429, 59619, 63855, 67215, 67941, 71331, 72891, 83061, 96459, 96909, 102795, 106959, 111495
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
select(n -> isprime(n-2) and isprime(n+2) and isprime(n^2-2) and isprime(n^2+2),
|
|
MATHEMATICA
|
pQ[n_]:=Module[{n2=n^2}, And@@PrimeQ[{n+2, n-2, n2+2, n2-2}]]; Select[Range[ 120000], pQ] (* Harvey P. Dale, Jun 04 2011 *)
|
|
PROG
|
(PARI) forstep(n=3, 100000, 6, if(isprime(n-2)&isprime(n+2)&isprime(n^2-2)&isprime(n^2+2), print1(n", ")))
(Magma) [n: n in [1..2000000]|IsPrime(n-2)and IsPrime(n+2)and IsPrime(n^2-2)and IsPrime(n^2+2)]; // Vincenzo Librandi, Apr 20 2011
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|