OFFSET
1,1
COMMENTS
Also: Primes p such that both p+2 and p-2 have at least three prime divisors. - David A. Corneth, Dec 28 2018
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
MAPLE
q:= n-> numtheory[bigomega](n)>2:
a:= proc(n) option remember; local p;
p:= `if`(n=1, 1, a(n-1));
do p:= nextprime(p);
if q(p-2) and q(p+2) then break fi
od; p
end:
seq(a(n), n=1..50); # Alois P. Heinz, Dec 28 2018
MATHEMATICA
Select[Prime[Range[1000]], PrimeOmega[#-2] > 2 && PrimeOmega[#+2] > 2&] (* Jean-François Alcover, Nov 26 2020 *)
PROG
(Java)
boolean isIsolatedPrime(int num){
int upper = num + 2;
int lower = num - 2;
return isPrime(num) &&
!isPrime(upper) &&
!isPrime(lower) &&
!isSemiPrime(upper) &&
!isSemiPrime(lower);
}
(PARI) is(n) = isprime(n) && bigomega(n + 2) > 2 && bigomega(n - 2) > 2 \\ David A. Corneth, Dec 28 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Kyle Buscaglia, Cory Baker, Dec 28 2018
STATUS
approved