OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = -1 because prime(1) = 2 and 2 + 2 = 4 is a semiprime;
a(2) = 1 because prime(2) = 3 and 3 + 2 = 5 is a prime;
a(14) = 0 because prime(14) = 43 and 43 + 2 = 45 is neither prime nor semiprime.
MAPLE
p:= 1:
for n from 1 to 100 do
p:= nextprime(p);
if isprime(p+2) then A[n]:=1
elif numtheory:-bigomega(p+2)=2 then A[n]:=-1
else A[n]:= 0
fi
od:
seq(A[n], n=1..100); # Robert Israel, Aug 29 2018
CROSSREFS
KEYWORD
easy,sign,less
AUTHOR
Giovanni Teofilatto, May 13 2005
EXTENSIONS
Corrected, and definition clarified, by Robert Israel, Aug 29 2018
STATUS
approved