OFFSET
1,1
COMMENTS
Conjecture: this sequence is infinite.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
2 is not a term because 2 = 2*2 - 2.
3 is a term because neither 1 (3-2) nor 5 (3+2) is a product of two primes.
MAPLE
q:= n-> andmap(x-> numtheory[bigomega](x)<>2, [n-2, n+2]):
select(q, [ithprime(i)$i=1..200])[]; # Alois P. Heinz, Jul 30 2021
MATHEMATICA
Select[Range[3, 1000], PrimeQ[#] && PrimeOmega[# - 2] != 2 && PrimeOmega[# + 2] != 2 &] (* Amiram Eldar, Jul 29 2021 *)
PROG
(Python)
from sympy import factorint, primerange
def semiprime(n): return sum(e for e in factorint(n).values()) == 2
def ok(p): return not semiprime(p-2) and not semiprime(p+2)
def aupto(limit): return list(filter(ok, primerange(1, limit+1)))
print(aupto(1031)) # Michael S. Branicky, Jul 29 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Marcin Barylski, Jul 27 2021
EXTENSIONS
More terms from Michael S. Branicky, Jul 29 2021
STATUS
approved